提交 e74da523 编写于 作者: S Steven Rostedt

tracing: fix seq read from trace files

The buffer used by trace_seq was updated incorrectly. Instead
of consuming what was actually read, it consumed the rest of the
buffer on reads.
Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
上级 2dc5d12b
......@@ -361,7 +361,7 @@ ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt)
cnt -= ret;
s->readpos += len;
s->readpos += cnt;
return cnt;
}
......@@ -380,7 +380,7 @@ ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt)
if (!ret)
return -EFAULT;
s->readpos += len;
s->readpos += cnt;
return cnt;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册