Skip to content

Commit

Permalink
f2fs: fix a compound statement label error
Browse files Browse the repository at this point in the history
An error "label at end of compound statement" will occur if CONFIG_F2FS_STAT_FS
disabled.
fs/f2fs/segment.c:556:1: error: label at end of compound statement
So clean up the 'out' label to fix it.

Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Gu Zheng <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
Gu Zheng authored and Jaegeuk Kim committed Aug 19, 2013
1 parent 92c4342 commit 7b40527
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/f2fs/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,20 +540,16 @@ static void allocate_segment_by_default(struct f2fs_sb_info *sbi,
{
struct curseg_info *curseg = CURSEG_I(sbi, type);

if (force) {
if (force)
new_curseg(sbi, type, true);
goto out;
}

if (type == CURSEG_WARM_NODE)
else if (type == CURSEG_WARM_NODE)
new_curseg(sbi, type, false);
else if (curseg->alloc_type == LFS && is_next_segment_free(sbi, type))
new_curseg(sbi, type, false);
else if (need_SSR(sbi) && get_ssr_segment(sbi, type))
change_curseg(sbi, type, true);
else
new_curseg(sbi, type, false);
out:
#ifdef CONFIG_F2FS_STAT_FS
sbi->segment_count[curseg->alloc_type]++;
#endif
Expand Down

0 comments on commit 7b40527

Please sign in to comment.