]> git.proxmox.com Git - mirror_ubuntu-impish-kernel.git/commitdiff
ext4: remove check for zero nr_to_scan in ext4_es_scan()
authorZhang Yi <yi.zhang@huawei.com>
Sat, 22 May 2021 10:30:44 +0000 (18:30 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 2 Aug 2021 11:26:49 +0000 (13:26 +0200)
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 <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210522103045.690103-2-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit e5e7010e5444d923e4091cafff61d05f2d19cada)
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
fs/ext4/extents_status.c

index 1d098423f53bbb652b2b1a77e1b3ac140498d54e..9a3a8996aacf7356131e3ea6a12e096f3a711695 100644 (file)
@@ -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);
 
        ret = percpu_counter_read_positive(&sbi->s_es_stats.es_stats_shk_cnt);