From: Ye Bin <yebin10@huawei.com>
To: <axboe@kernel.dk>, <rostedt@goodmis.org>, <mhiramat@kernel.org>,
<linux-block@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, Ye Bin <yebin10@huawei.com>
Subject: [PATCH -next 3/3] blktrace: remove unnessary stop block trace in 'blk_trace_shutdown'
Date: Mon, 17 Oct 2022 14:53:21 +0800 [thread overview]
Message-ID: <20221017065321.2846017-4-yebin10@huawei.com> (raw)
In-Reply-To: <20221017065321.2846017-1-yebin10@huawei.com>
As previous commit, '__blk_trace_remove' will stop block trace if
block trace's state is 'Blktrace_running'.
So remove unnessary stop block trace in 'blk_trace_shutdown'.
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
kernel/trace/blktrace.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 0d93a0110ab5..f33ec0f5750a 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -777,10 +777,8 @@ int blk_trace_ioctl(struct block_device *bdev, unsigned cmd, char __user *arg)
void blk_trace_shutdown(struct request_queue *q)
{
if (rcu_dereference_protected(q->blk_trace,
- lockdep_is_held(&q->debugfs_mutex))) {
- __blk_trace_startstop(q, 0);
+ lockdep_is_held(&q->debugfs_mutex)))
__blk_trace_remove(q);
- }
}
#ifdef CONFIG_BLK_CGROUP
--
2.31.1
prev parent reply other threads:[~2022-10-17 6:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-17 6:53 [PATCH -next 0/3] fix possible memleak in '__blk_trace_remove' Ye Bin
2022-10-17 6:53 ` [PATCH -next 1/3] blktrace: introduce 'blk_trace_swicth_state' helper Ye Bin
2022-10-18 7:40 ` Christoph Hellwig
2022-10-17 6:53 ` [PATCH -next 2/3] blktrace: fix possible memleak in '__blk_trace_remove' Ye Bin
2022-10-18 7:38 ` Yu Kuai
2022-10-18 7:41 ` Christoph Hellwig
2022-10-17 6:53 ` Ye Bin [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=20221017065321.2846017-4-yebin10@huawei.com \
--to=yebin10@huawei.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--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