summaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorYuwei Guan <ssawgyw@gmail.com>2022-11-15 09:35:36 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2022-11-28 23:46:33 +0300
commit777cd95b8066ced4e9a2534941b81f8ad98e74fb (patch)
tree516f7be03bcb5e43337425e580f4bad61350289d /fs/f2fs/super.c
parentb7ad23cec26a91a4f7c45ff7ff8e915f21ac5127 (diff)
downloadlinux-777cd95b8066ced4e9a2534941b81f8ad98e74fb.tar.xz
f2fs: cleanup for 'f2fs_tuning_parameters' function
A cleanup patch for 'f2fs_tuning_parameters' function. Signed-off-by: Yuwei Guan <Yuwei.Guan@zeekrlife.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 96cfe626a670..05101cd4140b 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4077,13 +4077,11 @@ static int f2fs_setup_casefold(struct f2fs_sb_info *sbi)
static void f2fs_tuning_parameters(struct f2fs_sb_info *sbi)
{
- struct f2fs_sm_info *sm_i = SM_I(sbi);
-
/* adjust parameters according to the volume size */
- if (sm_i->main_segments <= SMALL_VOLUME_SEGMENTS) {
+ if (MAIN_SEGS(sbi) <= SMALL_VOLUME_SEGMENTS) {
if (f2fs_block_unit_discard(sbi))
- sm_i->dcc_info->discard_granularity = 1;
- sm_i->ipu_policy = 1 << F2FS_IPU_FORCE |
+ SM_I(sbi)->dcc_info->discard_granularity = 1;
+ SM_I(sbi)->ipu_policy = 1 << F2FS_IPU_FORCE |
1 << F2FS_IPU_HONOR_OPU_WRITE;
}