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: Steven Rostedt <srostedt@redhat.com>
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 57155dc53..2e53e6f 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -361,7 +361,7 @@
cnt -= ret;
- s->readpos += len;
+ s->readpos += cnt;
return cnt;
}
@@ -380,7 +380,7 @@
if (!ret)
return -EFAULT;
- s->readpos += len;
+ s->readpos += cnt;
return cnt;
}