From: Ulrich Drepper Date: Thu, 24 Jul 2008 04:29:33 +0000 (-0700) Subject: flag parameters: NONBLOCK in anon_inode_getfd X-Git-Tag: v2.6.27-rc1~676 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=99829b832997d907c30669bfd17da32151e18f04;p=linux-2.6-omap-h63xx.git flag parameters: NONBLOCK in anon_inode_getfd 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 Signed-off-by: Linus Torvalds --- diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 1a4eee620b0..3662dd44896 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -116,7 +116,7 @@ int anon_inode_getfd(const char *name, const struct file_operations *fops, 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;