aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/trace/ring_buffer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index e444ff88f0a4..fd12cc56371f 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2396,6 +2396,13 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
2396 write &= RB_WRITE_MASK; 2396 write &= RB_WRITE_MASK;
2397 tail = write - length; 2397 tail = write - length;
2398 2398
2399 /*
2400 * If this is the first commit on the page, then it has the same
2401 * timestamp as the page itself.
2402 */
2403 if (!tail)
2404 delta = 0;
2405
2399 /* See if we shot pass the end of this buffer page */ 2406 /* See if we shot pass the end of this buffer page */
2400 if (unlikely(write > BUF_PAGE_SIZE)) 2407 if (unlikely(write > BUF_PAGE_SIZE))
2401 return rb_move_tail(cpu_buffer, length, tail, 2408 return rb_move_tail(cpu_buffer, length, tail,