diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 27bf203ef05a2..60492464281e2 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1690,8 +1690,7 @@ static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt) unsigned long __read_mostly tracing_thresh; static const struct file_operations tracing_max_lat_fops; -#if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \ - defined(CONFIG_FSNOTIFY) +#ifdef LATENCY_FS_NOTIFY static struct workqueue_struct *fsnotify_wq; diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 22f8c652ef8b4..87588d1e24cae 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -677,13 +677,13 @@ void update_max_tr_single(struct trace_array *tr, #if (defined(CONFIG_TRACER_MAX_TRACE) || defined(CONFIG_HWLAT_TRACER)) && \ defined(CONFIG_FSNOTIFY) +#define LATENCY_FS_NOTIFY +#endif +#ifdef LATENCY_FS_NOTIFY void latency_fsnotify(struct trace_array *tr); - #else - static inline void latency_fsnotify(struct trace_array *tr) { } - #endif #ifdef CONFIG_STACKTRACE