From: Steven Rostedt (Red Hat) Date: Fri, 1 Mar 2013 01:03:06 +0000 (-0500) Subject: tracing: Do not block on splice if either file or splice NONBLOCK flag is set X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=189e5784f6c5e001a84127b83f03bc76a8bfb1ec;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Steven Rostedt --- diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index ab3df804fa96..598a7aa7d0ae 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -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;