From ed493d61fe41d7079e99f1732af9168e7acf4407 Mon Sep 17 00:00:00 2001 From: Fengnan Chang Date: Tue, 12 Oct 2021 20:30:45 +0800 Subject: [PATCH] FROMGIT: f2fs: fix to use WHINT_MODE Since active_logs can be set to 2 or 4 or NR_CURSEG_PERSIST_TYPE(6), it cannot be set to NR_CURSEG_TYPE(8). That is, whint_mode is always off. Therefore, the condition is changed from NR_CURSEG_TYPE to NR_CURSEG_PERSIST_TYPE. Bug: 202812742 Cc: Chao Yu Fixes: d0b9e42ab615 (f2fs: introduce inmem curseg) Reported-by: tanghuan Signed-off-by: Keoseong Park Signed-off-by: Fengnan Chang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim (cherry picked from commit 011e0868e0cf1237675b22e36fffa958fb08f46e https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/ dev) Change-Id: Ic2a2b055e1f37f6263d8243527e83fe6bd4f7070 Signed-off-by: Fengnan Chang --- fs/f2fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 1539052338b9..5dc856b66714 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1185,7 +1185,7 @@ default_check: /* Not pass down write hints if the number of active logs is lesser * than NR_CURSEG_PERSIST_TYPE. */ - if (F2FS_OPTION(sbi).active_logs != NR_CURSEG_TYPE) + if (F2FS_OPTION(sbi).active_logs != NR_CURSEG_PERSIST_TYPE) F2FS_OPTION(sbi).whint_mode = WHINT_MODE_OFF; if (f2fs_sb_has_readonly(sbi) && !f2fs_readonly(sbi->sb)) {