aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ring_buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index a05541a8fbae..9d939e7ca924 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -3286,19 +3286,19 @@ ring_buffer_read(struct ring_buffer_iter *iter, u64 *ts)
3286 struct ring_buffer_per_cpu *cpu_buffer = iter->cpu_buffer; 3286 struct ring_buffer_per_cpu *cpu_buffer = iter->cpu_buffer;
3287 unsigned long flags; 3287 unsigned long flags;
3288 3288
3289 again:
3290 spin_lock_irqsave(&cpu_buffer->reader_lock, flags); 3289 spin_lock_irqsave(&cpu_buffer->reader_lock, flags);
3290 again:
3291 event = rb_iter_peek(iter, ts); 3291 event = rb_iter_peek(iter, ts);
3292 if (!event) 3292 if (!event)
3293 goto out; 3293 goto out;
3294 3294
3295 if (event->type_len == RINGBUF_TYPE_PADDING)
3296 goto again;
3297
3295 rb_advance_iter(iter); 3298 rb_advance_iter(iter);
3296 out: 3299 out:
3297 spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags); 3300 spin_unlock_irqrestore(&cpu_buffer->reader_lock, flags);
3298 3301
3299 if (event && event->type_len == RINGBUF_TYPE_PADDING)
3300 goto again;
3301
3302 return event; 3302 return event;
3303} 3303}
3304EXPORT_SYMBOL_GPL(ring_buffer_read); 3304EXPORT_SYMBOL_GPL(ring_buffer_read);