summaryrefslogtreecommitdiff
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-02-28 20:03:06 -0500
committerSteven Rostedt <rostedt@goodmis.org>2013-03-15 00:34:48 -0400
commit189e5784f6c5e001a84127b83f03bc76a8bfb1ec (patch)
tree56aa2f0cc1d00fbc74f70b84b1c5f2eabe53cb19 /kernel/trace/trace.c
parent92edca073c374f66b8eee20ec6426fb0cdb6c4d5 (diff)
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;