]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tracing: Switch trace_stack.c code over to use guard()
authorSteven Rostedt <rostedt@goodmis.org>
Wed, 25 Dec 2024 22:25:42 +0000 (17:25 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 26 Dec 2024 15:38:37 +0000 (10:38 -0500)
commit6c05353e4ff5875807f1a00f8d95e68b3d1e4d7f
tree67f3f6f1bf47b8b0e9ae6b1a4b5e1f5b4595ffea
parent930d2b32c0af6895ba4c6ca6404e7f7b6dc214ed
tracing: Switch trace_stack.c code over to use guard()

The function stack_trace_sysctl() uses a goto on the error path to jump to
the mutex_unlock() code. Replace the logic to use guard() and let the
compiler worry about it.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/20241225222931.684913592@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_stack.c