]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tracing: Exit out immediately after update_marker_trace()
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 6 Nov 2025 00:33:25 +0000 (19:33 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 10 Nov 2025 19:33:43 +0000 (14:33 -0500)
The call to update_marker_trace() in set_tracer_flag() performs the update
to the tr->trace_flags. There's no reason to perform it again after it is
called. Return immediately instead.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://patch.msgid.link/20251106003501.726406870@kernel.org
Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c

index ed929d331e1de7e3ed221108849ccaa3956ea307..88234b541b09c45ec9aebc0bcf8a31c3bd19889a 100644 (file)
@@ -5254,8 +5254,11 @@ int set_tracer_flag(struct trace_array *tr, u64 mask, int enabled)
                }
        }
 
-       if (mask == TRACE_ITER(COPY_MARKER))
+       if (mask == TRACE_ITER(COPY_MARKER)) {
                update_marker_trace(tr, enabled);
+               /* update_marker_trace updates the tr->trace_flags */
+               return 0;
+       }
 
        if (enabled)
                tr->trace_flags |= mask;