Commit 5bcd655f authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jaegeuk Kim

f2fs: remove the unused flush argument to change_curseg

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 8442d94b
...@@ -2656,7 +2656,7 @@ bool f2fs_segment_has_free_slot(struct f2fs_sb_info *sbi, int segno) ...@@ -2656,7 +2656,7 @@ bool f2fs_segment_has_free_slot(struct f2fs_sb_info *sbi, int segno)
* This function always allocates a used segment(from dirty seglist) by SSR * This function always allocates a used segment(from dirty seglist) by SSR
* manner, so it should recover the existing segment information of valid blocks * manner, so it should recover the existing segment information of valid blocks
*/ */
static void change_curseg(struct f2fs_sb_info *sbi, int type, bool flush) static void change_curseg(struct f2fs_sb_info *sbi, int type)
{ {
struct dirty_seglist_info *dirty_i = DIRTY_I(sbi); struct dirty_seglist_info *dirty_i = DIRTY_I(sbi);
struct curseg_info *curseg = CURSEG_I(sbi, type); struct curseg_info *curseg = CURSEG_I(sbi, type);
...@@ -2664,9 +2664,7 @@ static void change_curseg(struct f2fs_sb_info *sbi, int type, bool flush) ...@@ -2664,9 +2664,7 @@ static void change_curseg(struct f2fs_sb_info *sbi, int type, bool flush)
struct f2fs_summary_block *sum_node; struct f2fs_summary_block *sum_node;
struct page *sum_page; struct page *sum_page;
if (flush) write_sum_page(sbi, curseg->sum_blk, GET_SUM_BLOCK(sbi, curseg->segno));
write_sum_page(sbi, curseg->sum_blk,
GET_SUM_BLOCK(sbi, curseg->segno));
__set_test_and_inuse(sbi, new_segno); __set_test_and_inuse(sbi, new_segno);
...@@ -2705,7 +2703,7 @@ static void get_atssr_segment(struct f2fs_sb_info *sbi, int type, ...@@ -2705,7 +2703,7 @@ static void get_atssr_segment(struct f2fs_sb_info *sbi, int type,
struct seg_entry *se = get_seg_entry(sbi, curseg->next_segno); struct seg_entry *se = get_seg_entry(sbi, curseg->next_segno);
curseg->seg_type = se->type; curseg->seg_type = se->type;
change_curseg(sbi, type, true); change_curseg(sbi, type);
} else { } else {
/* allocate cold segment by default */ /* allocate cold segment by default */
curseg->seg_type = CURSEG_COLD_DATA; curseg->seg_type = CURSEG_COLD_DATA;
...@@ -2880,7 +2878,7 @@ void f2fs_allocate_segment_for_resize(struct f2fs_sb_info *sbi, int type, ...@@ -2880,7 +2878,7 @@ void f2fs_allocate_segment_for_resize(struct f2fs_sb_info *sbi, int type,
goto unlock; goto unlock;
if (f2fs_need_SSR(sbi) && get_ssr_segment(sbi, type, SSR, 0)) if (f2fs_need_SSR(sbi) && get_ssr_segment(sbi, type, SSR, 0))
change_curseg(sbi, type, true); change_curseg(sbi, type);
else else
new_curseg(sbi, type, true); new_curseg(sbi, type, true);
...@@ -3276,7 +3274,7 @@ void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page, ...@@ -3276,7 +3274,7 @@ void f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
if (need_new_seg(sbi, type)) if (need_new_seg(sbi, type))
new_curseg(sbi, type, false); new_curseg(sbi, type, false);
else else
change_curseg(sbi, type, true); change_curseg(sbi, type);
stat_inc_seg_type(sbi, curseg); stat_inc_seg_type(sbi, curseg);
} }
} }
...@@ -3539,7 +3537,7 @@ void f2fs_do_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, ...@@ -3539,7 +3537,7 @@ void f2fs_do_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
/* change the current segment */ /* change the current segment */
if (segno != curseg->segno) { if (segno != curseg->segno) {
curseg->next_segno = segno; curseg->next_segno = segno;
change_curseg(sbi, type, true); change_curseg(sbi, type);
} }
curseg->next_blkoff = GET_BLKOFF_FROM_SEG0(sbi, new_blkaddr); 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, ...@@ -3567,7 +3565,7 @@ void f2fs_do_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
if (recover_curseg) { if (recover_curseg) {
if (old_cursegno != curseg->segno) { if (old_cursegno != curseg->segno) {
curseg->next_segno = old_cursegno; curseg->next_segno = old_cursegno;
change_curseg(sbi, type, true); change_curseg(sbi, type);
} }
curseg->next_blkoff = old_blkoff; curseg->next_blkoff = old_blkoff;
curseg->alloc_type = old_alloc_type; curseg->alloc_type = old_alloc_type;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment