aboutsummaryrefslogtreecommitdiffstats
path: root/fs/anon_inodes.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-07-24 00:29:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:28 -0400
commit99829b832997d907c30669bfd17da32151e18f04 (patch)
treea9d4b9a3e475891198de0f37d376bda053399bde /fs/anon_inodes.c
parent4006553b06306b34054529477b06b68a1c66249b (diff)
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 <drepper@redhat.com> Acked-by: Davide Libenzi <davidel@xmailserver.org> Cc: Michael Kerrisk <mtk.manpages@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/anon_inodes.c')
-rw-r--r--fs/anon_inodes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
index 1a4eee620b0d..3662dd44896b 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,
116 file->f_mapping = anon_inode_inode->i_mapping; 116 file->f_mapping = anon_inode_inode->i_mapping;
117 117
118 file->f_pos = 0; 118 file->f_pos = 0;
119 file->f_flags = O_RDWR; 119 file->f_flags = O_RDWR | (flags & O_NONBLOCK);
120 file->f_version = 0; 120 file->f_version = 0;
121 file->private_data = priv; 121 file->private_data = priv;
122 122