提交 189e5784 编写于 作者: S Steven Rostedt (Red Hat) 提交者: Steven Rostedt

tracing: Do not block on splice if either file or splice NONBLOCK flag is set

Currently only the splice NONBLOCK flag is checked to determine if
the splice read should block or not. But the file descriptor NONBLOCK
flag also needs to be checked.
Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
上级 92edca07
......@@ -4593,7 +4593,7 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
/* did we read anything? */
if (!spd.nr_pages) {
if (flags & SPLICE_F_NONBLOCK)
if ((file->f_flags & O_NONBLOCK) || (flags & SPLICE_F_NONBLOCK))
ret = -EAGAIN;
else
ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册