Skip to content

Commit 5bcd655

Browse files
Christoph HellwigJaegeuk Kim
authored andcommitted
f2fs: remove the unused flush argument to change_curseg
Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 8442d94 commit 5bcd655

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

fs/f2fs/segment.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,17 +2656,15 @@ bool f2fs_segment_has_free_slot(struct f2fs_sb_info *sbi, int segno)
26562656
* This function always allocates a used segment(from dirty seglist) by SSR
26572657
* manner, so it should recover the existing segment information of valid blocks
26582658
*/
2659-
static void change_curseg(struct f2fs_sb_info *sbi, int type, bool flush)
2659+
static void change_curseg(struct f2fs_sb_info *sbi, int type)
26602660
{
26612661
struct dirty_seglist_info *dirty_i = DIRTY_I(sbi);
26622662
struct curseg_info *curseg = CURSEG_I(sbi, type);
26632663
unsigned int new_segno = curseg->next_segno;
26642664
struct f2fs_summary_block *sum_node;
26652665
struct page *sum_page;
26662666

2667-
if (flush)
2668-
write_sum_page(sbi, curseg->sum_blk,
2669-
GET_SUM_BLOCK(sbi, curseg->segno));
2667+
write_sum_page(sbi, curseg->sum_blk, GET_SUM_BLOCK(sbi, curseg->segno));
26702668

26712669
__set_test_and_inuse(sbi, new_segno);
26722670

@@ -2705,7 +2703,7 @@ static void get_atssr_segment(struct f2fs_sb_info *sbi, int type,
27052703
struct seg_entry *se = get_seg_entry(sbi, curseg->next_segno);
27062704

27072705
curseg->seg_type = se->type;
2708-
change_curseg(sbi, type, true);
2706+
change_curseg(sbi, type);
27092707
} else {
27102708
/* allocate cold segment by default */
27112709
curseg->seg_type = CURSEG_COLD_DATA;
@@ -2880,7 +2878,7 @@ void f2fs_allocate_segment_for_resize(struct f2fs_sb_info *sbi, int type,
28802878
goto unlock;
28812879

28822880
if (f2fs_need_SSR(sbi) && get_ssr_segment(sbi, type, SSR, 0))
2883-
change_curseg(sbi, type, true);
2881+
change_curseg(sbi, type);
28842882
else
28852883
new_curseg(sbi, type, true);
28862884

@@ -3276,7 +3274,7 @@ void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
32763274
if (need_new_seg(sbi, type))
32773275
new_curseg(sbi, type, false);
32783276
else
3279-
change_curseg(sbi, type, true);
3277+
change_curseg(sbi, type);
32803278
stat_inc_seg_type(sbi, curseg);
32813279
}
32823280
}
@@ -3539,7 +3537,7 @@ void f2fs_do_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
35393537
/* change the current segment */
35403538
if (segno != curseg->segno) {
35413539
curseg->next_segno = segno;
3542-
change_curseg(sbi, type, true);
3540+
change_curseg(sbi, type);
35433541
}
35443542

35453543
curseg->next_blkoff = GET_BLKOFF_FROM_SEG0(sbi, new_blkaddr);
@@ -3567,7 +3565,7 @@ void f2fs_do_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
35673565
if (recover_curseg) {
35683566
if (old_cursegno != curseg->segno) {
35693567
curseg->next_segno = old_cursegno;
3570-
change_curseg(sbi, type, true);
3568+
change_curseg(sbi, type);
35713569
}
35723570
curseg->next_blkoff = old_blkoff;
35733571
curseg->alloc_type = old_alloc_type;

0 commit comments

Comments
 (0)