tracing: Remove EVENT_FILE_FL_SOFT_MODE flag
authorSteven Rostedt <rostedt@goodmis.org>
Wed, 2 Jul 2025 18:36:57 +0000 (14:36 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 23 Jul 2025 00:15:51 +0000 (20:15 -0400)
commit07c3f391bcb217b6949b49785ccb5fee02be21fe
treea75c833968cb42267f52ad6f3646d014826ad223
parentc897c1e5b19dd4fc32e84fa1ab2065c2507be3a7
tracing: Remove EVENT_FILE_FL_SOFT_MODE flag

When soft disabling of trace events was first created, it needed to have a
way to know if a file had a user that was using it with soft disabled (for
triggers that need to enable or disable events from a context that can not
really enable or disable the event, it would set SOFT_DISABLED to state it
is disabled). The flag SOFT_MODE was used to denote that an event had a
user that would enable or disable it via the SOFT_DISABLED flag.

Commit 1cf4c0732db3c ("tracing: Modify soft-mode only if there's no other
referrer") fixed a bug where if two users were using the SOFT_DISABLED
flag the accounting would get messed up as the SOFT_MODE flag could only
handle one user. That commit added the sm_ref counter which kept track of
how many users were using the event in "soft mode". This made the
SOFT_MODE flag redundant as it should only be set if the sm_ref counter is
non zero.

Remove the SOFT_MODE flag and just use the sm_ref counter to know the
event is in soft mode or not. This makes the code a bit simpler.

Link: https://lore.kernel.org/all/20250702111908.03759998@batman.local.home/
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Gabriele Paoloni <gpaoloni@redhat.com>
Link: https://lore.kernel.org/20250702143657.18dd1882@batman.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
include/linux/trace_events.h
kernel/trace/trace_events.c