From patchwork Wed Oct 26 07:56:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ye Bin X-Patchwork-Id: 13020260 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C463AC433FE for ; Wed, 26 Oct 2022 07:34:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229551AbiJZHet (ORCPT ); Wed, 26 Oct 2022 03:34:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232489AbiJZHer (ORCPT ); Wed, 26 Oct 2022 03:34:47 -0400 Received: from dggsgout12.his.huawei.com (unknown [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B718DFF3; Wed, 26 Oct 2022 00:34:42 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4My0rF53QRz6T6mt; Wed, 26 Oct 2022 15:32:13 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP4 (Coremail) with SMTP id gCh0CgCntOYO41hjqLzeAA--.4330S4; Wed, 26 Oct 2022 15:34:40 +0800 (CST) From: Ye Bin To: axboe@kernel.dk, rostedt@goodmis.org, mhiramat@kernel.org, linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ye Bin Subject: [PATCH] blktrace:use '__blk_trace_remove' helper in 'blk_trace_remove_queue' Date: Wed, 26 Oct 2022 15:56:31 +0800 Message-Id: <20221026075631.682100-1-yebin@huaweicloud.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CM-TRANSID: gCh0CgCntOYO41hjqLzeAA--.4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k List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Ye Bin 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 --- 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); } /*