From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org
Subject: Re: [PATCH 2/2] tracing/blktrace: Fix to allow setting same value
Date: Fri, 17 Aug 2018 02:07:17 +0900 [thread overview]
Message-ID: <20180817020717.7c0402429f0d4397f1b8d586@kernel.org> (raw)
In-Reply-To: <20180816124917.77c82f04@gandalf.local.home>
On Thu, 16 Aug 2018 12:49:17 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> > >
> > > Hmm, why not just do this? Does this fix it too?
> >
> > Ah, yes, but we need to clear "ret" in that case.
>
> Sure.
>
> >
> > Thanks!
> >
> > >
> > > diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> > > index 987d9a9ae283..10b2b9c5fd25 100644
> > > --- a/kernel/trace/blktrace.c
> > > +++ b/kernel/trace/blktrace.c
> > > @@ -1841,6 +1841,8 @@ static ssize_t sysfs_blk_trace_attr_store(struct device *dev,
> > > mutex_lock(&q->blk_trace_mutex);
> > >
>
> > > if (attr == &dev_attr_enable) {
> > > + if (!!value == !!q->blk_trace) {
> + ret = 0;
> > > + goto out_unlock_bdev;
> + }
>
OK, I tested and ensured that this works.
Tested-by: Masami Hiramatsu <mhiramat@kernel.org>
Thanks!
--
Masami Hiramatsu <mhiramat@kernel.org>
prev parent reply other threads:[~2018-08-16 17:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <153441301698.6024.1680500212551396320.stgit@devbox>
2018-08-16 9:51 ` [PATCH 2/2] tracing/blktrace: Fix to allow setting same value Masami Hiramatsu
2018-08-16 14:38 ` Steven Rostedt
2018-08-16 16:38 ` Masami Hiramatsu
2018-08-16 16:49 ` Steven Rostedt
2018-08-16 17:07 ` Masami Hiramatsu [this message]
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=20180817020717.7c0402429f0d4397f1b8d586@kernel.org \
--to=mhiramat@kernel.org \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
/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).