diff options
author | Steven Rostedt | 2024-07-26 14:42:08 -0400 |
---|---|---|
committer | Steven Rostedt (Google) | 2024-08-07 18:12:46 -0400 |
commit | 6e2fdceffdc6bd7b8ba314a1d1b976721533c8f9 (patch) | |
tree | 9f1216947f7d5f38dea5d101baed29293a10e82b /include | |
parent | b1560408692cd0ab0370cfbe9deb03ce97ab3f6d (diff) |
tracing: Use refcount for trace_event_file reference counter
Instead of using an atomic counter for the trace_event_file reference
counter, use the refcount interface. It has various checks to make sure
the reference counting is correct, and will warn if it detects an error
(like refcount_inc() on '0').
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20240726144208.687cce24@rorschach.local.home
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/trace_events.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index 9df3e2973626..fed58e54f15e 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -680,7 +680,7 @@ struct trace_event_file { * caching and such. Which is mostly OK ;-) */ unsigned long flags; - atomic_t ref; /* ref count for opened files */ + refcount_t ref; /* ref count for opened files */ atomic_t sm_ref; /* soft-mode reference counter */ atomic_t tm_ref; /* trigger-mode reference counter */ }; |