From patchwork Mon Oct 17 06:53:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ye Bin X-Patchwork-Id: 3219 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1302861wrs; Sun, 16 Oct 2022 23:49:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4DmoQJZQPI2EcQzNj6DPjyFNxe4HvRmlQmsaceW56vEXUvFgJZo7Yxi3U1BHA/JlLtubiR X-Received: by 2002:a17:907:1c8a:b0:782:1a0d:3373 with SMTP id nb10-20020a1709071c8a00b007821a0d3373mr7204317ejc.135.1665989377669; Sun, 16 Oct 2022 23:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665989377; cv=none; d=google.com; s=arc-20160816; b=Cb2woVsPrQnP+wARIncktw6iOscT8eLBCB13xA6jdpors46c+GyvAU8X+7uOKOs/8P tZraLXqViKY9dUkOsBp1qyhYe8gRHu7zoeU6cEZaS38N50VIXvydkbzxjjrkDfnVSLyA CV0ISYux1IB9cY95r+8jQaS0OunEPf2m2oK8nWKSm7vVOqk3RwYFovzgXKshvemaMVKe UkPb7KE3kicI0nNO7WAXeCXTjIm/7wl4A7lNXNYuFMv7Ss29DZfusUt3j/zrQvwOc4TF SPXASycbMbzj11AvOox3t0wPf5/ccOkBzSERYMmbQIO4SfnGFfV3sINFfXpgNzKnXndJ hKWQ== 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=cCJtU7xgIQJgXNPlVxuKbPbuu0dQD3uBd8Fu8radvqQ=; b=kiM54FB9pdBnQmUKBG+CtHDyStmPpiPzA4/NbOiOeAwAFds9oNUkiXDOpHV7ppVFae N8EpLWBcqbcKhkRMOJNLLXegDofmmeFxWBCgjFUJ8Ut4+hlaL97IHpVSBZWc/1qRE51Q kAERX/ylw2TqH4Lt8hddJKP+D5fZP1826i9rslQ8TvxoKdNeoehwwDliIsHN9yebGCmU IWPUTc7hEleMeZbi84mZ2y6/ObAHdbY+bpPs2wQDfAFWeldouzQhKOkvwOcJNP91o6IJ wtJQkI4QHRSgMADzah77gDJGH7gtHz1lMgAUNenAHF2jtZzzIcMXEvbkxc3gIf28+Z7d t1JA== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g22-20020a1709065d1600b0077d1df3967asi8601085ejt.563.2022.10.16.23.49.12; Sun, 16 Oct 2022 23:49:37 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230171AbiJQGbc (ORCPT + 99 others); Mon, 17 Oct 2022 02:31:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbiJQGbV (ORCPT ); Mon, 17 Oct 2022 02:31:21 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBE3756BA0; Sun, 16 Oct 2022 23:31:19 -0700 (PDT) Received: from canpemm500010.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MrRrK6sLtzpWH0; Mon, 17 Oct 2022 14:28:01 +0800 (CST) Received: from huawei.com (10.175.127.227) by canpemm500010.china.huawei.com (7.192.105.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 17 Oct 2022 14:31:17 +0800 From: Ye Bin To: , , , CC: , Ye Bin Subject: [PATCH -next 3/3] blktrace: remove unnessary stop block trace in 'blk_trace_shutdown' Date: Mon, 17 Oct 2022 14:53:21 +0800 Message-ID: <20221017065321.2846017-4-yebin10@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221017065321.2846017-1-yebin10@huawei.com> References: <20221017065321.2846017-1-yebin10@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500010.china.huawei.com (7.192.105.118) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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?1746916477763027876?= X-GMAIL-MSGID: =?utf-8?q?1746916477763027876?= 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 --- 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