]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ring-buffer: Removed unnecessary if() goto out where out is the next line
authorSteven Rostedt <rostedt@goodmis.org>
Tue, 27 May 2025 19:51:16 +0000 (15:51 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 29 May 2025 12:24:07 +0000 (08:24 -0400)
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: a389d86f7fd0 ("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>
kernel/trace/ring_buffer.c

index e40f5c6d7908b43ea04f1e9115e7989eecdad1a3..a01fc42f2a13b5d8851628cbd0ad6a9fd3c77892 100644 (file)
@@ -4685,10 +4685,7 @@ void ring_buffer_discard_commit(struct trace_buffer *buffer,
        RB_WARN_ON(buffer, !local_read(&cpu_buffer->committing));
 
        rb_decrement_entry(cpu_buffer, event);
-       if (rb_try_to_discard(cpu_buffer, event))
-               goto out;
-
- out:
+       rb_try_to_discard(cpu_buffer, event);
        rb_end_commit(cpu_buffer);
 
        trace_recursive_unlock(cpu_buffer);