summaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-03-01 02:03:06 +0100
committerSteven Rostedt <rostedt@goodmis.org>2013-03-15 05:34:48 +0100
commit189e5784f6c5e001a84127b83f03bc76a8bfb1ec (patch)
tree56aa2f0cc1d00fbc74f70b84b1c5f2eabe53cb19 /kernel/trace/trace.c
parenttracing: Use direct field, type and system names (diff)
downloadlinux-189e5784f6c5e001a84127b83f03bc76a8bfb1ec.tar.xz
linux-189e5784f6c5e001a84127b83f03bc76a8bfb1ec.zip
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 <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c2
1 files changed, 1 insertions, 1 deletions
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;