mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ye Bin <yebin@huaweicloud.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] blktrace:use '__blk_trace_remove' helper in 'blk_trace_remove_queue'
Date: Wed, 26 Oct 2022 15:56:31 +0800	[thread overview]
Message-ID: <20221026075631.682100-1-yebin@huaweicloud.com> (raw)

From: Ye Bin <yebin10@huawei.com>

After '60a9bb9048f9' and 'dcd1a59c62dc' commit 'blk_trace_remove_queue' is do
the same job with '__blk_trace_remove', so just call '__blk_trace_remove'.

Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 kernel/trace/blktrace.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index a995ea1ef849..115ae18e479d 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -1609,19 +1609,7 @@ device_initcall(init_blk_tracer);
 
 static int blk_trace_remove_queue(struct request_queue *q)
 {
-	struct blk_trace *bt;
-
-	bt = rcu_replace_pointer(q->blk_trace, NULL,
-				 lockdep_is_held(&q->debugfs_mutex));
-	if (bt == NULL)
-		return -EINVAL;
-
-	blk_trace_stop(bt);
-
-	put_probe_ref();
-	synchronize_rcu();
-	blk_trace_free(q, bt);
-	return 0;
+	return __blk_trace_remove(q);
 }
 
 /*
-- 
2.31.1


                 reply	other threads:[~2022-10-26  7:34 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=20221026075631.682100-1-yebin@huaweicloud.com \
    --to=yebin@huaweicloud.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 \
    --cc=yebin10@huawei.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

all inboxes | Powered by JetHome®