Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1719142rwb; Thu, 29 Sep 2022 00:57:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM61P+0zE17NkSy0+zgIVConh9ngZyOIsSUQgDzVO2iplYoK2p53qNgiPHI/ysY7q3sjoB80 X-Received: by 2002:a17:907:25cd:b0:77b:9672:38e7 with SMTP id ae13-20020a17090725cd00b0077b967238e7mr1702079ejc.10.1664438261846; Thu, 29 Sep 2022 00:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664438261; cv=none; d=google.com; s=arc-20160816; b=WvLml/E23Nk80qZTQJQ3U8Fi2RNZ+NQl89w9Y2hMIn6sWprzyiQ8qRvBX0eLWKshm5 ass0yUEEFHZwMO2D5D2YYU0Irx01POHnaWsMlhu29VzTWXIRhJJyhQy/FuZKpzfEh7m9 tEk3N4415gozfUxuRqYvc6qHYPuz5T6RY0QBoGcJcmpI6Cbrqc01UhMqqgoF1so+b9gL Ar2cfCS0+Eobmf9/fnDrG0jfc/wd9cQ706p2xABl5jiWYdHfvA0jNxMqMj6eTl6+zwWP OglXBu78zJBDxVtiWf7NtL6mgiI1Ev5zOtjiTiQDIDTike6CxS9KMB6LgcZGZ8MwyT9I FLnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=m3Rhy5rtvxwMDBtovQ9nfHUVkLxOmBmgTbyOuHFRlHI=; b=VEmShtzRJ2AmNlQmxnrgGGpfX0iwKCb8M+zeoxArYAT9jegtjJCev17rhsq6NFIXLD hSjdA6bnicGmeTXeadoTtPnrwy1jDA1kK41udY7moCFVg4mAy7JCTWWcHhTDM+rOIThk mpzp+nvcJppy5O9vLvlO2FBUtGQ+3/pIwauiwJAlPV4xNhG4U3xl6PWwEcAKWDy+t1jr 8MduyglcLfqQedKL2vMT5XrYZ5O15tH1lMWmj9vmsxuVSyS1O3zp5cZ6o/iX6fhenPra Lw8MZWBTmtjcUY0lR8F1LSW+c65NEykBXGKHpmIVIUW9nj6y93u8+KNDRMNJy3dd2xbX Exsw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go34-20020a1709070da200b00726b4f91300si7742804ejc.269.2022.09.29.00.57.15; Thu, 29 Sep 2022 00:57:41 -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 S235457AbiI2Hlp (ORCPT + 99 others); Thu, 29 Sep 2022 03:41:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235443AbiI2HlS (ORCPT ); Thu, 29 Sep 2022 03:41:18 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0975139F64; Thu, 29 Sep 2022 00:41:00 -0700 (PDT) Received: from kwepemi500016.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MdQD31rKyzWh2W; Thu, 29 Sep 2022 15:36:51 +0800 (CST) Received: from huawei.com (10.174.178.129) by kwepemi500016.china.huawei.com (7.221.188.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 29 Sep 2022 15:40:57 +0800 From: Kemeng Shi To: , CC: , , , Subject: [PATCH 1/3] block: Remove redundant parent blkcg_gp check in check_scale_change Date: Thu, 29 Sep 2022 15:40:53 +0800 Message-ID: <20220929074055.30080-2-shikemeng@huawei.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20220929074055.30080-1-shikemeng@huawei.com> References: <20220929074055.30080-1-shikemeng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.178.129] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500016.china.huawei.com (7.221.188.220) 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 Function blkcg_iolatency_throttle will make sure blkg->parent is not NULL before calls check_scale_change. And function check_scale_change is only called in blkcg_iolatency_throttle. Signed-off-by: Kemeng Shi --- block/blk-iolatency.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index e285152345a2..a8cc5abe91e5 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -403,9 +403,6 @@ static void check_scale_change(struct iolatency_grp *iolat) u64 scale_lat; int direction = 0; - if (lat_to_blkg(iolat)->parent == NULL) - return; - parent = blkg_to_lat(lat_to_blkg(iolat)->parent); if (!parent) return; -- 2.30.0