summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorKeoseong Park <keosung.park@samsung.com>2021-09-27 09:06:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-25 11:48:31 +0300
commit9ad4e63e3cca9f41bdc8850a19a207a0b009344c (patch)
treec96e6194ab5c7bcc97f59c8e6d8bc6095a6f0e8c /fs/f2fs
parent0dfaa04f0161a4a48eaa03911f2fa1c1ee1f8a4c (diff)
downloadlinux-9ad4e63e3cca9f41bdc8850a19a207a0b009344c.tar.xz
f2fs: fix to use WHINT_MODE
[ Upstream commit 011e0868e0cf1237675b22e36fffa958fb08f46e ] 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. Cc: Chao Yu <chao@kernel.org> Fixes: d0b9e42ab615 (f2fs: introduce inmem curseg) Reported-by: tanghuan <tanghuan@vivo.com> Signed-off-by: Keoseong Park <keosung.park@samsung.com> Signed-off-by: Fengnan Chang <changfengnan@vivo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index dbe040b66802..4d24146b4f47 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1292,7 +1292,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)) {