diff options
| author | Steven Rostedt (Red Hat) <[email protected]> | 2013-02-28 20:03:06 -0500 |
|---|---|---|
| committer | Steven Rostedt <[email protected]> | 2013-03-15 00:34:48 -0400 |
| commit | 189e5784f6c5e001a84127b83f03bc76a8bfb1ec (patch) | |
| tree | 56aa2f0cc1d00fbc74f70b84b1c5f2eabe53cb19 | |
| parent | 92edca073c374f66b8eee20ec6426fb0cdb6c4d5 (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 <[email protected]>
| -rw-r--r-- | kernel/trace/trace.c | 2 |
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; |