]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Feb 2026 15:31:35 +0000 (16:31 +0100)
commit 761dac9073cd67d4705a94cd1af674945a117f4c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/gc.c

index 5f90cca64c7aa2a6821c5099c9f124f3b77f1c28..6886486d266145150be4ea88a0347f34a42e699d 100644 (file)
@@ -2093,6 +2093,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),