From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> tracefs_tracing_dir() and tracefs_debug_dir() would try to mount the directories if they were not already mounted. But this broke, fix it. Link: https://lore.kernel.org/all/20221128132106.291101-1-beanhuo@xxxxxxxx/ Reported-by: Bean Huo <beanhuo@xxxxxxxx> Fixes: 7c2b882ed1 ("libtracefs: Add tracefs_tracing_dir_is_mounted() API") Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- src/tracefs-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tracefs-utils.c b/src/tracefs-utils.c index 777912e46821..d91ff40eee87 100644 --- a/src/tracefs-utils.c +++ b/src/tracefs-utils.c @@ -245,7 +245,7 @@ const char *tracefs_tracing_dir(void) if (tracing_dir) return tracing_dir; - tracing_dir = trace_find_tracing_dir(false); + tracing_dir = find_tracing_dir(false, true); return tracing_dir; } @@ -263,7 +263,7 @@ const char *tracefs_debug_dir(void) if (debug_dir) return debug_dir; - debug_dir = trace_find_tracing_dir(true); + debug_dir = find_tracing_dir(true, true); return debug_dir; } -- 2.35.1