* [PATCH] libtracefs: Have tracefs_{tracing,debug}_dir() mount {tracefs,debugfs} if not mounted
@ 2022-12-08 16:07 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2022-12-08 16:07 UTC (permalink / raw)
To: Linux Trace Devel; +Cc: Bean Huo
From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
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@iokpp.de/
Reported-by: Bean Huo <beanhuo@iokpp.de>
Fixes: 7c2b882ed1 ("libtracefs: Add tracefs_tracing_dir_is_mounted() API")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-08 16:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-08 16:07 [PATCH] libtracefs: Have tracefs_{tracing,debug}_dir() mount {tracefs,debugfs} if not mounted Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).