From: Greg Kroah-Hartman Date: Wed, 31 Jul 2024 06:36:08 +0000 (+0200) Subject: 5.15-stable patches X-Git-Tag: v6.1.103~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c82ad4147bf68afafe1437fd4ccf9c25d7a5781;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: f2fs-fix-wrong-continue-condition-in-gc.patch --- diff --git a/queue-5.15/f2fs-fix-wrong-continue-condition-in-gc.patch b/queue-5.15/f2fs-fix-wrong-continue-condition-in-gc.patch new file mode 100644 index 00000000000..21a983f2259 --- /dev/null +++ b/queue-5.15/f2fs-fix-wrong-continue-condition-in-gc.patch @@ -0,0 +1,41 @@ +From 605b0a778aa2599aa902ae639b8e9937c74b869b Mon Sep 17 00:00:00 2001 +From: Jaegeuk Kim +Date: Fri, 12 Aug 2022 22:49:50 -0700 +Subject: f2fs: fix wrong continue condition in GC + +From: Jaegeuk Kim + +commit 605b0a778aa2599aa902ae639b8e9937c74b869b upstream. + +We should decrease the frozen counter. + +Cc: stable@vger.kernel.org +Fixes: 325163e9892b ("f2fs: add gc_urgent_high_remaining sysfs node") +Reviewed-by: Chao Yu +Signed-off-by: Jaegeuk Kim +Signed-off-by: Greg Kroah-Hartman +--- + fs/f2fs/gc.c | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +--- a/fs/f2fs/gc.c ++++ b/fs/f2fs/gc.c +@@ -93,14 +93,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); + diff --git a/queue-5.15/series b/queue-5.15/series index 81d1e8a955f..95457c27867 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -303,3 +303,4 @@ nvme-separate-command-prep-and-issue.patch nvme-pci-add-missing-condition-check-for-existence-o.patch fs-don-t-allow-non-init-s_user_ns-for-filesystems-wi.patch powerpc-configs-update-defconfig-with-now-user-visible-config_fsl_ifc.patch +f2fs-fix-wrong-continue-condition-in-gc.patch