This is a note to let you know that I've just added the patch titled f2fs: fix wrong continue condition in GC to the 5.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: f2fs-fix-wrong-continue-condition-in-gc.patch and it can be found in the queue-5.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 605b0a778aa2599aa902ae639b8e9937c74b869b Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> Date: Fri, 12 Aug 2022 22:49:50 -0700 Subject: f2fs: fix wrong continue condition in GC From: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> commit 605b0a778aa2599aa902ae639b8e9937c74b869b upstream. We should decrease the frozen counter. Cc: stable@xxxxxxxxxxxxxxx Fixes: 325163e9892b ("f2fs: add gc_urgent_high_remaining sysfs node") Reviewed-by: Chao Yu <chao@xxxxxxxxxx> Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/f2fs/gc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -97,14 +97,10 @@ static int gc_thread_func(void *data) */ if (sbi->gc_mode == GC_URGENT_HIGH) { spin_lock(&sbi->gc_urgent_high_lock); - if (sbi->gc_urgent_high_limited) { - if (!sbi->gc_urgent_high_remaining) { - sbi->gc_urgent_high_limited = false; - spin_unlock(&sbi->gc_urgent_high_lock); - sbi->gc_mode = GC_NORMAL; - continue; - } - sbi->gc_urgent_high_remaining--; + if (sbi->gc_urgent_high_limited && + !sbi->gc_urgent_high_remaining--) { + sbi->gc_urgent_high_limited = false; + sbi->gc_mode = GC_NORMAL; } spin_unlock(&sbi->gc_urgent_high_lock); } Patches currently in stable-queue which might be from jaegeuk@xxxxxxxxxx are queue-5.19/f2fs-increase-the-limit-for-reserve_root.patch queue-5.19/f2fs-fix-to-do-sanity-check-on-destination-blkaddr-during-recovery.patch queue-5.19/f2fs-complete-checkpoints-during-remount.patch queue-5.19/f2fs-flush-pending-checkpoints-when-freezing-super.patch queue-5.19/f2fs-fix-to-do-sanity-check-on-summary-info.patch queue-5.19/f2fs-fix-wrong-continue-condition-in-gc.patch