Skip to content

Commit 2d22216

Browse files
committed
ring-buffer: Removed unnecessary if() goto out where out is the next line
In the function ring_buffer_discard_commit() there's an if statement that jumps to the next line: if (rb_try_to_discard(cpu_buffer, event)) goto out; out: This was caused by the change that modified the way timestamps were taken in interrupt context, and removed the code between the if statement and the goto, but failed to update the conditional logic. Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/20250527155116.227f35be@gandalf.local.home Fixes: a389d86 ("ring-buffer: Have nested events still record running time stamp") Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 32dc004 commit 2d22216

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

kernel/trace/ring_buffer.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4685,10 +4685,7 @@ void ring_buffer_discard_commit(struct trace_buffer *buffer,
46854685
RB_WARN_ON(buffer, !local_read(&cpu_buffer->committing));
46864686

46874687
rb_decrement_entry(cpu_buffer, event);
4688-
if (rb_try_to_discard(cpu_buffer, event))
4689-
goto out;
4690-
4691-
out:
4688+
rb_try_to_discard(cpu_buffer, event);
46924689
rb_end_commit(cpu_buffer);
46934690

46944691
trace_recursive_unlock(cpu_buffer);

0 commit comments

Comments
 (0)