From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> 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@xxxxxxxxxxx> --- 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