diff options
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r-- | kernel/trace/ring_buffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 4832ffa5d937..0b9de5a3d699 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -1017,12 +1017,8 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1017 | } | 1017 | } |
1018 | 1018 | ||
1019 | if (next_page == head_page) { | 1019 | if (next_page == head_page) { |
1020 | if (!(buffer->flags & RB_FL_OVERWRITE)) { | 1020 | if (!(buffer->flags & RB_FL_OVERWRITE)) |
1021 | /* reset write */ | ||
1022 | if (tail <= BUF_PAGE_SIZE) | ||
1023 | local_set(&tail_page->write, tail); | ||
1024 | goto out_unlock; | 1021 | goto out_unlock; |
1025 | } | ||
1026 | 1022 | ||
1027 | /* tail_page has not moved yet? */ | 1023 | /* tail_page has not moved yet? */ |
1028 | if (tail_page == cpu_buffer->tail_page) { | 1024 | if (tail_page == cpu_buffer->tail_page) { |
@@ -1097,6 +1093,10 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1097 | return event; | 1093 | return event; |
1098 | 1094 | ||
1099 | out_unlock: | 1095 | out_unlock: |
1096 | /* reset write */ | ||
1097 | if (tail <= BUF_PAGE_SIZE) | ||
1098 | local_set(&tail_page->write, tail); | ||
1099 | |||
1100 | __raw_spin_unlock(&cpu_buffer->lock); | 1100 | __raw_spin_unlock(&cpu_buffer->lock); |
1101 | local_irq_restore(flags); | 1101 | local_irq_restore(flags); |
1102 | return NULL; | 1102 | return NULL; |