* [PATCH] libtracefs: Have trace_get_options() use trace_get_lock() helper
@ 2021-04-09 20:15 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2021-04-09 20:15 UTC (permalink / raw)
To: Linux Trace Devel; +Cc: Yordan Karadzhov
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Instead of having trace_get_options() figure out what lock it needs to
use, have it use the trace_get_lock() helper instead.
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
src/tracefs-tools.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tracefs-tools.c b/src/tracefs-tools.c
index fa09da5..6ef17f6 100644
--- a/src/tracefs-tools.c
+++ b/src/tracefs-tools.c
@@ -211,7 +211,7 @@ enum tracefs_option_id tracefs_option_id(const char *name)
const static struct tracefs_options_mask *
trace_get_options(struct tracefs_instance *instance, bool enabled)
{
- pthread_mutex_t *lock = instance ? &instance->lock : &toplevel_lock;
+ pthread_mutex_t *lock = trace_get_lock(instance);
struct tracefs_options_mask *bitmask;
enum tracefs_option_id id;
unsigned long long set;
--
2.29.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-09 20:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-09 20:15 [PATCH] libtracefs: Have trace_get_options() use trace_get_lock() helper 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).