Skip to content

Commit ecd69be

Browse files
SToPireJaegeuk Kim
authored andcommitted
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>
1 parent 3763f9e commit ecd69be

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

fs/f2fs/segment.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2645,7 +2645,7 @@ static void write_current_sum_page(struct f2fs_sb_info *sbi,
26452645
}
26462646

26472647
static int is_next_segment_free(struct f2fs_sb_info *sbi,
2648-
struct curseg_info *curseg, int type)
2648+
struct curseg_info *curseg)
26492649
{
26502650
unsigned int segno = curseg->segno + 1;
26512651
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)
30733073
if (!is_set_ckpt_flags(sbi, CP_CRC_RECOVERY_FLAG) &&
30743074
curseg->seg_type == CURSEG_WARM_NODE)
30753075
return true;
3076-
if (curseg->alloc_type == LFS &&
3077-
is_next_segment_free(sbi, curseg, type) &&
3076+
if (curseg->alloc_type == LFS && is_next_segment_free(sbi, curseg) &&
30783077
likely(!is_sbi_flag_set(sbi, SBI_CP_DISABLED)))
30793078
return true;
30803079
if (!f2fs_need_SSR(sbi) || !get_ssr_segment(sbi, type, SSR, 0))

0 commit comments

Comments
 (0)