Skip to content

Commit

Permalink
f2fs: remove __allocate_new_section
Browse files Browse the repository at this point in the history
Just fold this trivial wrapper into the only caller.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Christoph Hellwig authored and asuka-mio committed Mar 3, 2023
1 parent 7cf8bbb commit 1255680
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions fs/f2fs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -2923,17 +2923,11 @@ static void __allocate_new_segment(struct f2fs_sb_info *sbi, int type,
locate_dirty_segment(sbi, old_segno);
}

static void __allocate_new_section(struct f2fs_sb_info *sbi,
int type, bool force)
{
__allocate_new_segment(sbi, type, true, force);
}

void f2fs_allocate_new_section(struct f2fs_sb_info *sbi, int type, bool force)
{
f2fs_down_read(&SM_I(sbi)->curseg_lock);
down_write(&SIT_I(sbi)->sentry_lock);
__allocate_new_section(sbi, type, force);
__allocate_new_segment(sbi, type, true, force);
up_write(&SIT_I(sbi)->sentry_lock);
f2fs_up_read(&SM_I(sbi)->curseg_lock);
}
Expand Down

0 comments on commit 1255680

Please sign in to comment.