From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: Yordan Karadzhov <y.karadz@gmail.com>
Subject: [PATCH] libtracefs: Have trace_get_options() use trace_get_lock() helper
Date: Fri, 9 Apr 2021 16:15:19 -0400 [thread overview]
Message-ID: <20210409161519.6155c5ea@gandalf.local.home> (raw)
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
reply other threads:[~2021-04-09 20:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210409161519.6155c5ea@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=y.karadz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).