]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 10:55:27 +0000 (12:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 10:55:27 +0000 (12:55 +0200)
added patches:
f2fs-fix-wrong-condition-to-trigger-background-checkpoint-correctly.patch

queue-5.10/f2fs-fix-wrong-condition-to-trigger-background-checkpoint-correctly.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/f2fs-fix-wrong-condition-to-trigger-background-checkpoint-correctly.patch b/queue-5.10/f2fs-fix-wrong-condition-to-trigger-background-checkpoint-correctly.patch
new file mode 100644 (file)
index 0000000..9db5b62
--- /dev/null
@@ -0,0 +1,33 @@
+From cd6d697a6e2013a0a85f8b261b16c8cfd50c1f5f Mon Sep 17 00:00:00 2001
+From: Chao Yu <chao@kernel.org>
+Date: Wed, 29 Sep 2021 03:19:14 +0800
+Subject: f2fs: fix wrong condition to trigger background checkpoint correctly
+
+From: Chao Yu <chao@kernel.org>
+
+commit cd6d697a6e2013a0a85f8b261b16c8cfd50c1f5f upstream.
+
+In f2fs_balance_fs_bg(), it needs to check both NAT_ENTRIES and INO_ENTRIES
+memory usage to decide whether we should skip background checkpoint, otherwise
+we may always skip checking INO_ENTRIES memory usage, so that INO_ENTRIES may
+potentially cause high memory footprint.
+
+Fixes: 493720a48543 ("f2fs: fix to avoid REQ_TIME and CP_TIME collision")
+Signed-off-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/segment.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/f2fs/segment.c
++++ b/fs/f2fs/segment.c
+@@ -550,7 +550,7 @@ void f2fs_balance_fs_bg(struct f2fs_sb_i
+               goto do_sync;
+       /* checkpoint is the only way to shrink partial cached entries */
+-      if (f2fs_available_free_memory(sbi, NAT_ENTRIES) ||
++      if (f2fs_available_free_memory(sbi, NAT_ENTRIES) &&
+               f2fs_available_free_memory(sbi, INO_ENTRIES))
+               return;
index afe6cc786b5cb46acd825356311dd813c56b15b7..e32612c026943380d8c469228f37465bf3d417b3 100644 (file)
@@ -390,3 +390,4 @@ revert-drm-amdgpu-use-dirty-framebuffer-helper.patch
 ext4-continue-to-expand-file-system-when-the-target-size-doesn-t-reach.patch
 inet-fully-convert-sk-sk_rx_dst-to-rcu-rules.patch
 thermal-intel_powerclamp-use-first-online-cpu-as-control_cpu.patch
+f2fs-fix-wrong-condition-to-trigger-background-checkpoint-correctly.patch