Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Remove duplicate latency_fsnotify() stub

When the SNAPSHOT is defined but FSNOTIFY is not the latency_fsnotify()
function is turned into a static inline stub. But this stub was defined in
both trace.h and trace_snapshot.c causing a error in build when
CONFIG_SNAPSHOT is defined but FSNOTIFY is not. The stub is not needed in
trace_snapshot.c as it will be defined in trace.h, remove it from the C
file.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20260330205859.24c0aae3@gandalf.local.home
Fixes: bade44fe5462 ("tracing: Move snapshot code out of trace.c and into trace_snapshot.c")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603310604.lGE9LDBK-lkp@intel.com/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

+2 -3
+1 -1
kernel/trace/trace.h
··· 845 845 #if defined(CONFIG_TRACER_MAX_TRACE) && defined(CONFIG_FSNOTIFY) 846 846 # define LATENCY_FS_NOTIFY 847 847 #endif 848 + #endif /* CONFIG_TRACER_SNAPSHOT */ 848 849 849 850 #ifdef LATENCY_FS_NOTIFY 850 851 void latency_fsnotify(struct trace_array *tr); 851 852 #else 852 853 static inline void latency_fsnotify(struct trace_array *tr) { } 853 854 #endif 854 - #endif /* CONFIG_TRACER_SNAPSHOT */ 855 855 856 856 #ifdef CONFIG_STACKTRACE 857 857 void __trace_stack(struct trace_array *tr, unsigned int trace_ctx, int skip);
+1 -2
kernel/trace/trace_snapshot.c
··· 391 391 */ 392 392 irq_work_queue(&tr->fsnotify_irqwork); 393 393 } 394 - #else 395 - static inline void latency_fsnotify(struct trace_array *tr) { } 396 394 #endif /* LATENCY_FS_NOTIFY */ 395 + 397 396 static const struct file_operations tracing_max_lat_fops; 398 397 399 398 void trace_create_maxlat_file(struct trace_array *tr,