diff options
author | Yifan Zhao <zhaoyifan@sjtu.edu.cn> | 2024-04-25 16:55:28 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-04-29 19:41:17 +0200 |
commit | ecd69be71aad3b9299b37b3d8cc3f0fb6016286f (patch) | |
tree | a1584e5fb43c41bf7c42c6c4f022eb6dc5ebe911 /fs/f2fs/segment.c | |
parent | f2fs: use helper to print zone condition (diff) | |
download | linux-ecd69be71aad3b9299b37b3d8cc3f0fb6016286f.tar.xz linux-ecd69be71aad3b9299b37b3d8cc3f0fb6016286f.zip |
f2fs: remove redundant parameter in is_next_segment_free()
is_next_segment_free() takes a redundant `type` parameter. Remove it.
Signed-off-by: Yifan Zhao <zhaoyifan@sjtu.edu.cn>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 5d6dae4861f3..4396df2bceab 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -2645,7 +2645,7 @@ static void write_current_sum_page(struct f2fs_sb_info *sbi, } static int is_next_segment_free(struct f2fs_sb_info *sbi, - struct curseg_info *curseg, int type) + struct curseg_info *curseg) { unsigned int segno = curseg->segno + 1; struct free_segmap_info *free_i = FREE_I(sbi); @@ -3073,8 +3073,7 @@ static bool need_new_seg(struct f2fs_sb_info *sbi, int type) if (!is_set_ckpt_flags(sbi, CP_CRC_RECOVERY_FLAG) && curseg->seg_type == CURSEG_WARM_NODE) return true; - if (curseg->alloc_type == LFS && - is_next_segment_free(sbi, curseg, type) && + if (curseg->alloc_type == LFS && is_next_segment_free(sbi, curseg) && likely(!is_sbi_flag_set(sbi, SBI_CP_DISABLED))) return true; if (!f2fs_need_SSR(sbi) || !get_ssr_segment(sbi, type, SSR, 0)) |