diff options
Diffstat (limited to 'kernel/trace')
-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 da2c59d8f486..79d6012bb1f1 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -3373,12 +3373,16 @@ void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu) | |||
3373 | 3373 | ||
3374 | spin_lock_irqsave(&cpu_buffer->reader_lock, flags); | 3374 | spin_lock_irqsave(&cpu_buffer->reader_lock, flags); |
3375 | 3375 | ||
3376 | if (RB_WARN_ON(cpu_buffer, local_read(&cpu_buffer->committing))) | ||
3377 | goto out; | ||
3378 | |||
3376 | __raw_spin_lock(&cpu_buffer->lock); | 3379 | __raw_spin_lock(&cpu_buffer->lock); |
3377 | 3380 | ||
3378 | rb_reset_cpu(cpu_buffer); | 3381 | rb_reset_cpu(cpu_buffer); |
3379 | 3382 | ||
3380 | __raw_spin_unlock(&cpu_buffer->lock); | 3383 | __raw_spin_unlock(&cpu_buffer->lock); |
3381 | 3384 | ||
3385 | out: | ||
3382 | spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags); | 3386 | spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags); |
3383 | 3387 | ||
3384 | atomic_dec(&cpu_buffer->record_disabled); | 3388 | atomic_dec(&cpu_buffer->record_disabled); |