OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
92edca0
)
tracing: Do not block on splice if either file or splice NONBLOCK flag is set
author
Steven Rostedt (Red Hat)
<rostedt@goodmis.org>
Fri, 1 Mar 2013 01:03:06 +0000
(20:03 -0500)
committer
Steven Rostedt
<rostedt@goodmis.org>
Fri, 15 Mar 2013 04:34:48 +0000
(
00:34
-0400)
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>
kernel/trace/trace.c
patch
|
blob
|
history
diff --git
a/kernel/trace/trace.c
b/kernel/trace/trace.c
index
ab3df80
..
598a7aa
100644
(file)
--- 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;