diff options
-rw-r--r-- | kernel/trace/trace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 8a58f5196f27..a3f3d0cf2daf 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3624,8 +3624,6 @@ tracing_buffers_read(struct file *filp, char __user *ubuf, if (info->read < PAGE_SIZE) goto read; - info->read = 0; - trace_access_lock(info->cpu); ret = ring_buffer_read_page(info->tr->buffer, &info->spare, @@ -3640,6 +3638,8 @@ tracing_buffers_read(struct file *filp, char __user *ubuf, if (pos < PAGE_SIZE) memset(info->spare + pos, 0, PAGE_SIZE - pos); + info->read = 0; + read: size = PAGE_SIZE - info->read; if (size > count) |