]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2024 06:36:08 +0000 (08:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2024 06:36:08 +0000 (08:36 +0200)
added patches:
f2fs-fix-wrong-continue-condition-in-gc.patch

queue-5.15/f2fs-fix-wrong-continue-condition-in-gc.patch [new file with mode: 0644]
queue-5.15/series

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 (file)
index 0000000..21a983f
--- /dev/null
@@ -0,0 +1,41 @@
+From 605b0a778aa2599aa902ae639b8e9937c74b869b Mon Sep 17 00:00:00 2001
+From: Jaegeuk Kim <jaegeuk@kernel.org>
+Date: Fri, 12 Aug 2022 22:49:50 -0700
+Subject: f2fs: fix wrong continue condition in GC
+
+From: Jaegeuk Kim <jaegeuk@kernel.org>
+
+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 <chao@kernel.org>
+Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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);
index 81d1e8a955f23236f6c90cdf106a66403dafcbcf..95457c2786716279a3d06d251c7a78d2129fad42 100644 (file)
@@ -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