]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tracing: Remove unnecessary check for EVENT_FILE_FL_FREED
authorPetr Pavlu <petr.pavlu@suse.com>
Thu, 19 Feb 2026 16:27:03 +0000 (17:27 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 24 Mar 2026 00:16:45 +0000 (20:16 -0400)
commitf55c09dabbabcbb119d1c0f8182fb4b69338bcd5
tree2dd54351ee8be0bed55705d41848b3609f5d6496
parent473e470f16f98569d59adc11c4a318780fb68fe9
tracing: Remove unnecessary check for EVENT_FILE_FL_FREED

The event_filter_write() function calls event_file_file() to retrieve
a trace_event_file associated with a given file struct. If a non-NULL
pointer is returned, the function then checks whether the trace_event_file
instance has the EVENT_FILE_FL_FREED flag set. This check is redundant
because event_file_file() already performs this validation and returns NULL
if the flag is set. The err value is also already initialized to -ENODEV.

Remove the unnecessary check for EVENT_FILE_FL_FREED in
event_filter_write().

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Tom Zanussi <zanussi@kernel.org>
Link: https://patch.msgid.link/20260219162737.314231-4-petr.pavlu@suse.com
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace_events.c