From patchwork Tue Oct 18 14:51:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ye Bin X-Patchwork-Id: 4203 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1992640wrs; Tue, 18 Oct 2022 07:31:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5TtrUBblXDD9UM+AmjPRtvUpJ6DPP8E8PwKPL+lx2/uVLwrJiraLjfZCP1IwWkupCOfzos X-Received: by 2002:a17:90b:3803:b0:20d:332e:f48d with SMTP id mq3-20020a17090b380300b0020d332ef48dmr38664598pjb.209.1666103508358; Tue, 18 Oct 2022 07:31:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666103508; cv=none; d=google.com; s=arc-20160816; b=xa1RGv8Rj++8u0zeCfXidX4Y9Kxy/swxURh703c3Yh9oSmw1lJcuhZTQ6ilbK61Fux 2p8VoIK7vN6auDa7DDHlK7aRzPcMsQ9RlUBf1/vNpn3stCD0ACyoq8XXb1ZUGlc65fWx es88bcEziwOchlV9t9ty68FjCvTqHN5ZT2dEm1VuV4igo8bhyiOiCtyXhvajVsdbTj1r exQ2Zb+hV/4Pi75EFS2CVIKpOzNMesptlUGeq2Ua9R03jMmiBOX5PSab75CE01gXqT83 y+gS4/JX96Pc6expgBKiDvAR+WR3g8PAaMnh5I99uxNrXN1MrAMXvSWxuWk/eP5Aup50 swTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=owsgG65mzpOLhY1pwW6UaqwcKTmFYpTvzUPo08sbymU=; b=Umrsklt6rW7EH6XhM5w1UsL1uUc9biEhpbqOZwU7osDjkbvaVagNlzPhOLq8njhZZ1 ocG3ZoP8XQ/c/rx5v30h9AJ72aOZVuYP4DnQv8VmC6hg20dRA8nKFfiTuiIPuJB5gF9z dcjXYKsYjQ5TRVEAebTqfSL4NvV6NiHuVgMOLihPMtdOgEfAWsGgXcXa20EFbTsLlU4P tTCz1Zw0ICKWRGQtJ85ac/ikzem5ax4LahCyRM7vcYdY/3ijZ50J4+d4h64FOELm8iI4 VMLKZrxSff/flRQiGbEEzxDx5vS6NN3lBV369ZjEuoOWVKAdjIBFfGBpaxgI5KXXmycQ FoNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s9-20020a170902b18900b0017f8d9b7e5fsi14630268plr.133.2022.10.18.07.31.35; Tue, 18 Oct 2022 07:31:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231508AbiJRO37 (ORCPT + 99 others); Tue, 18 Oct 2022 10:29:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231514AbiJRO3m (ORCPT ); Tue, 18 Oct 2022 10:29:42 -0400 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 30C85192A8; Tue, 18 Oct 2022 07:29:41 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4MsGQv1Bpmz6R48k; Tue, 18 Oct 2022 22:27:19 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP4 (Coremail) with SMTP id gCh0CgBHWTBRuE5jkSo6AA--.18765S7; Tue, 18 Oct 2022 22:29:39 +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, yebin@huaweicloud.com Subject: [PATCH v2 3/3] blktrace: remove unnessary stop block trace in 'blk_trace_shutdown' Date: Tue, 18 Oct 2022 22:51:35 +0800 Message-Id: <20221018145135.932240-4-yebin@huaweicloud.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221018145135.932240-1-yebin@huaweicloud.com> References: <20221018145135.932240-1-yebin@huaweicloud.com> MIME-Version: 1.0 X-CM-TRANSID: gCh0CgBHWTBRuE5jkSo6AA--.18765S7 X-Coremail-Antispam: 1UD129KBjvdXoWrtrW5ury5ury8AryfXF1rCrg_yoWfAwb_A3 WUWwn2ga17Gr9Yvr4fJF4fXw1qq3sFqF109a45JrW5Aw1DJrZ8GanxAFs8Wr90va1qgasr Zr13Jwn7J3ZYyjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb-kFF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6r1j6r18M7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUWwA2048vs2IY02 0Ec7CjxVAFwI0_Gr0_Xr1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr1UM2 8EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AI xVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20x vE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xv r2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxAIw28IcxkI7VAKI48JMxC20s 026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_ JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14 v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xva j40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JV W8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUjAR67UUUUU== X-CM-SenderInfo: p1hex046kxt4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747036152030829745?= X-GMAIL-MSGID: =?utf-8?q?1747036152030829745?= As previous commit, 'blk_trace_cleanup' 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 Reviewed-by: Christoph Hellwig --- 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 030e5716661e..2be8c747f796 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -784,10 +784,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