Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Ulrich Drepper and committed by
Linus Torvalds
99829b83 4006553b

+1 -1
+1 -1
fs/anon_inodes.c
··· 116 116 file->f_mapping = anon_inode_inode->i_mapping; 117 117 118 118 file->f_pos = 0; 119 - file->f_flags = O_RDWR; 119 + file->f_flags = O_RDWR | (flags & O_NONBLOCK); 120 120 file->f_version = 0; 121 121 file->private_data = priv; 122 122