f2fs: fix uninitialized skipped_gc_rwsem
[platform/kernel/linux-starfive.git] / fs / f2fs / gc.c
index ee68364..aa928d1 100644 (file)
@@ -1792,8 +1792,8 @@ int f2fs_gc(struct f2fs_sb_info *sbi, struct f2fs_gc_control *gc_control)
                                prefree_segments(sbi));
 
        cpc.reason = __get_cp_reason(sbi);
-       sbi->skipped_gc_rwsem = 0;
 gc_more:
+       sbi->skipped_gc_rwsem = 0;
        if (unlikely(!(sbi->sb->s_flags & SB_ACTIVE))) {
                ret = -EINVAL;
                goto stop;