mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 12/18] flag parametersi: NONBLOCK in anon_inode_getfd
@ 2008-05-05  3:42 Ulrich Drepper
  2008-05-05  4:54 ` Davide Libenzi
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Drepper @ 2008-05-05  3:42 UTC (permalink / raw)
  To: linux-kernel, netdev; +Cc: akpm, davidel, mtk.manpages, torvalds

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.


 anon_inodes.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Signed-off-by: Ulrich Drepper <drepper@redhat.com>

diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c
index 977ef20..3662dd4 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;
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-05  4:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-05  3:42 [PATCH 12/18] flag parametersi: NONBLOCK in anon_inode_getfd Ulrich Drepper
2008-05-05  4:54 ` Davide Libenzi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®