提交 99829b83 编写于 作者: U Ulrich Drepper 提交者: Linus Torvalds

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: NUlrich Drepper <drepper@redhat.com>
Acked-by: NDavide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk.manpages@googlemail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 4006553b
...@@ -116,7 +116,7 @@ int anon_inode_getfd(const char *name, const struct file_operations *fops, ...@@ -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_mapping = anon_inode_inode->i_mapping;
file->f_pos = 0; file->f_pos = 0;
file->f_flags = O_RDWR; file->f_flags = O_RDWR | (flags & O_NONBLOCK);
file->f_version = 0; file->f_version = 0;
file->private_data = priv; file->private_data = priv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册