]> git.ipfire.org Git - thirdparty/linux.git/commit
tracing: Clean up use of trace_create_maxlat_file()
authorSteven Rostedt <rostedt@goodmis.org>
Sun, 8 Feb 2026 00:11:01 +0000 (19:11 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 9 Feb 2026 02:01:11 +0000 (21:01 -0500)
commitba73713da50e5c24499ca8941171593466ea34f7
tree0e61a0786eba259029b1df2c0163e714acdf4d55
parent326669faf3cbfda31b2203f0a66aa87812062e5f
tracing: Clean up use of trace_create_maxlat_file()

In trace.c, the function trace_create_maxlat_file() is defined behind the
 #ifdef CONFIG_TRACER_MAX_TRACE block. The #else part defines it as:

 #define trace_create_maxlat_file(tr, d_tracer) \
trace_create_file("tracing_max_latency", TRACE_MODE_WRITE, \
  d_tracer, tr, &tracing_max_lat_fops)

But the one place that it it used has:

 #ifdef CONFIG_TRACER_MAX_TRACE
trace_create_maxlat_file(tr, d_tracer);
 #endif

Which is pointless and also wrong!

It only gets created when both CONFIG_TRACE_MAX_TRACE and CONFIG_FS_NOTIFY
is defined, but the file itself should not be dependent on
CONFIG_FS_NOTIFY. Always create that file when TRACE_MAX_TRACE is defined
regardless if FS_NOTIFY is or is not.

Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Link: https://patch.msgid.link/20260207191101.0e014abd@robin
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c