tracing: make tr->d_max_latency accessible without CONFIG_FSNOTIFY
PATCH 1/1 tracing: make tr->d_max_latency accessible without CONFIG_FSNOTIFY
From: Arnd Bergmann <[email protected]>
A recent change attempted to make the tracing_max_latency file visible unconditionally, but this lead to a build failure:
kernel/trace/trace.c: In function 'trace_create_maxlat_file':kernel/trace/trace.c:1543:13: error: 'struct trace_array' has no member named 'd_max_latency'; did you mean 'max_latency'?
1543 | tr->d_max_latency = trace_create_file("tracing_max_latency",
| ^~~~~~~~~~~~~
Make the corresponding change in the header file.
--- kernel/trace/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/trace.h +1 -1
@@ -351,8 +351,8 @@ struct trace_array {unsigned int snapshot;#ifdef CONFIG_TRACER_MAX_TRACE unsigned long max_latency; -#ifdef CONFIG_FSNOTIFY struct dentry *d_max_latency; +#ifdef CONFIG_FSNOTIFY struct work_struct fsnotify_work;struct irq_work fsnotify_irqwork;#endif /* CONFIG_FSNOTIFY */
Signature · 1 line
2.39.5
Steven Rostedt
maintainerQuoted 8 lines · On Tue, 10 Feb 2026 15:13:06 +0100 Arnd Bergmann <[email protected]> wrote:
From: Arnd Bergmann <[email protected]>
A recent change attempted to make the
tracing_max_latencyfile visible unconditionally, but this lead to a build failure:
kernel/trace/trace.c: In function 'trace_create_maxlat_file':kernel/trace/trace.c:1543:13: error: 'structtrace_array' has no member named 'd_max_latency'; did you mean 'max_latency'?
1543 |tr->d_max_latency= trace_create_file("tracing_max_latency",
Quoted 6 lines
| ^~~~~~~~~~~~~Make the corresponding change in the header file.
Fixes ba73713da50e ("tracing: Clean up use of trace_create_maxlat_file()")Signed-off-by Arnd Bergmann <[email protected]>
Beat you to it ;-)
https://lore.kernel.org/linux-trace-kernel/20260209194631.788bfc85@fedora/
-- Steve
Steven Rostedt
maintainerQuoted 13 lines · On Wed, 11 Feb 2026 12:51:52 -0500 Steven Rostedt <[email protected]> wrote:
Quoted 10 lines · On Tue, 10 Feb 2026 15:13:06 +0100 Arnd Bergmann <[email protected]> wrote:
From: Arnd Bergmann <[email protected]>
A recent change attempted to make the
tracing_max_latencyfile visible unconditionally, but this lead to a build failure:
kernel/trace/trace.c: In function 'trace_create_maxlat_file':kernel/trace/trace.c:1543:13: error: 'structtrace_array' has no member named 'd_max_latency'; did you mean 'max_latency'?
1543 |tr->d_max_latency= trace_create_file("tracing_max_latency",| ^~~~~~~~~~~~~
Quoted 8 lines
Quoted 4 lines
Make the corresponding change in the header file.
Fixes ba73713da50e ("tracing: Clean up use of trace_create_maxlat_file()")Signed-off-by Arnd Bergmann <[email protected]>Beat you to it ;-)
https://lore.kernel.org/linux-trace-kernel/20260209194631.788bfc85@fedora/
In fact, our changes were so identical that patchwork set both my patch and your patch to queued when I applied mine to linux-next!
https://patchwork.kernel.org/project/linux-trace-kernel/patch/[email protected]/
-- Steve