Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1836467pxj; Sat, 22 May 2021 03:22:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuKGZom1bx41mxhNxSG5OovIdtQwzZcGGh1shI3m98ou+LLn4YscI7hZHPHPfEjTxxYCM8 X-Received: by 2002:a17:906:1b57:: with SMTP id p23mr14523515ejg.176.1621678970417; Sat, 22 May 2021 03:22:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621678970; cv=none; d=google.com; s=arc-20160816; b=kwFQeMSSAHB/foNJNGryC99HOWij2MyP0WSAAel7lcjw3QcWH9a737mkF6CAjN5Bgd PEe0+tJ56Nq3QMtuOwBxOqpXxAIzhb+cDHXe63guwgW2vsvP3hhuXaVSQkRNIortS1GL 1uSYfLfrnPG26Qcjv52HTlLC11ovTeqPVfokwfQkG1H5HtaJx1kWZzyKvf/jbwL66Rf1 MRarN3WIaoNO64MLKxIeYTKzaOTlCNVGiEx4s+cUb/t1/t7x2Xsas9EZ9VzuvFoSA+Cn 7EnoluiJ+mv2KzZYI1tpp5bgABo7NYWOm3wbRYhvLWI0TGvsbUrIHPuEtEcOiNDV5HsU tzow== 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=AvQ9W7UU9c+jzjgOy17i4LBGATbgxWo+r0/A21UTlJs=; b=Lo1Lw5rpGaYSlDloHZBNeNT+6eY6abFpysUxlxJ/01Y4gB5DSVcAu9XbhQjxvEKtzE U1ELjPRBEpZxtKGqc2hvKC+SK4LK5EQ5EnLFHJepIh/z9EdeO3AtVLIMqBDKGfpax2lI B7pyLStGYLDd7AcR9OeP/X6X1vc0zoy1vlEsQpq062wrhZVjW9+oglLHzqigmKujNczs xmGBsxz9Vyoy9WxXy90Yqxi2AT9e4E4V5whqN4m+gfkIuYmZBhNPNCBFv9lp4NCJCHKE Zh3rLGFQkF3uU+d17dR3seRCGErEltaaSOVSizaGMRCouASvfj/6qUT9iFs1ohHiqdKk LMmQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hc37si3842859ejc.354.2021.05.22.03.22.27; Sat, 22 May 2021 03:22:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230164AbhEVKWm (ORCPT + 99 others); Sat, 22 May 2021 06:22:42 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5734 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhEVKWk (ORCPT ); Sat, 22 May 2021 06:22:40 -0400 Received: from dggems705-chm.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FnKD613mlzqVJc; Sat, 22 May 2021 18:17:42 +0800 (CST) Received: from dggeme752-chm.china.huawei.com (10.3.19.98) by dggems705-chm.china.huawei.com (10.3.19.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Sat, 22 May 2021 18:21:14 +0800 Received: from huawei.com (10.175.127.227) by dggeme752-chm.china.huawei.com (10.3.19.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sat, 22 May 2021 18:21:14 +0800 From: Zhang Yi To: CC: , , , , Subject: [PATCH 1/2] ext4: remove check for zero nr_to_scan in ext4_es_scan() Date: Sat, 22 May 2021 18:30:44 +0800 Message-ID: <20210522103045.690103-2-yi.zhang@huawei.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20210522103045.690103-1-yi.zhang@huawei.com> References: <20210522103045.690103-1-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggeme752-chm.china.huawei.com (10.3.19.98) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org After converting fs shrinkers to new scan/count API, we are no longer pass zero nr_to_scan parameter to detect the number of objects to free, just remove this check. Fixes: 1ab6c4997e04 ("fs: convert fs shrinkers to new scan/count API") Cc: stable@vger.kernel.org # 3.12+ Signed-off-by: Zhang Yi --- fs/ext4/extents_status.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c index 0a729027322d..db3cd70a72e4 100644 --- a/fs/ext4/extents_status.c +++ b/fs/ext4/extents_status.c @@ -1574,9 +1574,6 @@ static unsigned long ext4_es_scan(struct shrinker *shrink, ret = percpu_counter_read_positive(&sbi->s_es_stats.es_stats_shk_cnt); trace_ext4_es_shrink_scan_enter(sbi->s_sb, nr_to_scan, ret); - if (!nr_to_scan) - return ret; - nr_shrunk = __es_shrink(sbi, nr_to_scan, NULL); trace_ext4_es_shrink_scan_exit(sbi->s_sb, nr_shrunk, ret); -- 2.25.4