]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
f2fs: fix to add gc count stat in f2fs_gc_range
authorZhiguo Niu <zhiguo.niu@unisoc.com>
Fri, 26 Dec 2025 02:56:04 +0000 (10:56 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 1 Jan 2026 03:27:26 +0000 (03:27 +0000)
It missed the stat count in f2fs_gc_range.

Cc: stable@kernel.org
Fixes: 9bf1dcbdfdc8 ("f2fs: fix to account gc stats correctly")
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/gc.c

index 6afd57fa538737cfb2a68b7522708878930e9de4..58b291d19f068201cb3daca3e7e811a331d2c8dc 100644 (file)
@@ -2096,6 +2096,7 @@ int f2fs_gc_range(struct f2fs_sb_info *sbi,
        if (unlikely(f2fs_cp_error(sbi)))
                return -EIO;
 
+       stat_inc_gc_call_count(sbi, FOREGROUND);
        for (segno = start_seg; segno <= end_seg; segno += SEGS_PER_SEC(sbi)) {
                struct gc_inode_list gc_list = {
                        .ilist = LIST_HEAD_INIT(gc_list.ilist),