From: Ulrich Drepper Building on the previous change to anon_inode_getfd, this patch introduces support for handling of O_NONBLOCK in addition to the already supported O_CLOEXEC. Following patches will take advantage of this support. As can be seen, the additional support for supporting this functionality is minimal. Signed-off-by: Ulrich Drepper Acked-by: Davide Libenzi Cc: Michael Kerrisk Signed-off-by: Andrew Morton --- fs/anon_inodes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN fs/anon_inodes.c~flag-parametersi-nonblock-in-anon_inode_getfd fs/anon_inodes.c --- a/fs/anon_inodes.c~flag-parametersi-nonblock-in-anon_inode_getfd +++ a/fs/anon_inodes.c @@ -116,7 +116,7 @@ int anon_inode_getfd(const char *name, c file->f_mapping = anon_inode_inode->i_mapping; file->f_pos = 0; - file->f_flags = O_RDWR; + file->f_flags = O_RDWR | (flags & O_NONBLOCK); file->f_version = 0; file->private_data = priv; _