diff options
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r-- | kernel/trace/ring_buffer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 9e42a742a3f9..7876df00695f 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -2650,6 +2650,8 @@ void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu) | |||
2650 | if (!cpumask_test_cpu(cpu, buffer->cpumask)) | 2650 | if (!cpumask_test_cpu(cpu, buffer->cpumask)) |
2651 | return; | 2651 | return; |
2652 | 2652 | ||
2653 | atomic_inc(&cpu_buffer->record_disabled); | ||
2654 | |||
2653 | spin_lock_irqsave(&cpu_buffer->reader_lock, flags); | 2655 | spin_lock_irqsave(&cpu_buffer->reader_lock, flags); |
2654 | 2656 | ||
2655 | __raw_spin_lock(&cpu_buffer->lock); | 2657 | __raw_spin_lock(&cpu_buffer->lock); |
@@ -2659,6 +2661,8 @@ void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu) | |||
2659 | __raw_spin_unlock(&cpu_buffer->lock); | 2661 | __raw_spin_unlock(&cpu_buffer->lock); |
2660 | 2662 | ||
2661 | spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags); | 2663 | spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags); |
2664 | |||
2665 | atomic_dec(&cpu_buffer->record_disabled); | ||
2662 | } | 2666 | } |
2663 | EXPORT_SYMBOL_GPL(ring_buffer_reset_cpu); | 2667 | EXPORT_SYMBOL_GPL(ring_buffer_reset_cpu); |
2664 | 2668 | ||