Skip to content

Commit

Permalink
tracing: Do not block on splice if either file or splice NONBLOCK fla…
Browse files Browse the repository at this point in the history
…g 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>
  • Loading branch information
Steven Rostedt (Red Hat) committed Mar 15, 2013
1 parent 92edca0 commit 189e578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 189e578

Please sign in to comment.