Skip to content

Commit 189e578

Browse files
committed
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>
1 parent 92edca0 commit 189e578

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/trace/trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4593,7 +4593,7 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
45934593

45944594
/* did we read anything? */
45954595
if (!spd.nr_pages) {
4596-
if (flags & SPLICE_F_NONBLOCK)
4596+
if ((file->f_flags & O_NONBLOCK) || (flags & SPLICE_F_NONBLOCK))
45974597
ret = -EAGAIN;
45984598
else
45994599
ret = 0;

0 commit comments

Comments
 (0)