]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
tracing: Use the new eventfs descriptor for print trigger
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 8 Sep 2023 02:19:11 +0000 (22:19 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Sat, 9 Sep 2023 03:13:01 +0000 (23:13 -0400)
The check to create the print event "trigger" was using the obsolete "dir"
value of the trace_event_file to determine if it should create the trigger
or not. But that value will now be NULL because it uses the event file
descriptor.

Change it to test the "ef" field of the trace_event_file structure so that
the trace_marker "trigger" file appears again.

Link: https://lkml.kernel.org/r/20230908022001.371815239@goodmis.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ajay Kaher <akaher@vmware.com>
Fixes: 27152bceea1df ("eventfs: Move tracing/events to eventfs")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/trace.c

index 0608ad20cf30ea24330a40c02c65a7eca4e8c470..122c23c9eb280b478774665ffd6f4b28127cbb1b 100644 (file)
@@ -9792,8 +9792,8 @@ init_tracer_tracefs(struct trace_array *tr, struct dentry *d_tracer)
                          tr, &tracing_mark_fops);
 
        file = __find_event_file(tr, "ftrace", "print");
-       if (file && file->dir)
-               trace_create_file("trigger", TRACE_MODE_WRITE, file->dir,
+       if (file && file->ef)
+               eventfs_add_file("trigger", TRACE_MODE_WRITE, file->ef,
                                  file, &event_trigger_fops);
        tr->trace_marker_file = file;