diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2012-12-21 11:47:05 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2012-12-28 11:24:09 +0900 |
commit | 12a67146e35ba1d04ac4a5430eaaa8790158d60e (patch) | |
tree | 9a3a2c0768d04fba20e0be8cc07f9cb6ae4a71c5 /fs/f2fs/segment.c | |
parent | 71e9fec548a95b2a4cf378646addd5d3098684a2 (diff) | |
download | blackbird-op-linux-12a67146e35ba1d04ac4a5430eaaa8790158d60e.tar.gz blackbird-op-linux-12a67146e35ba1d04ac4a5430eaaa8790158d60e.zip |
f2fs: return a default value for non-void function
This patch resolves a build warning reported by kbuild test robot.
"
fs/f2fs/segment.c: In function '__get_segment_type':
fs/f2fs/segment.c:806:1: warning: control reaches end of non-void
function [-Wreturn-type]
"
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index ca7b5ffb09d5..fe2cc0bdc115 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -791,11 +791,10 @@ static int __get_segment_type(struct page *page, enum page_type p_type) return __get_segment_type_2(page, p_type); case 4: return __get_segment_type_4(page, p_type); - case 6: - return __get_segment_type_6(page, p_type); - default: - BUG(); } + /* NR_CURSEG_TYPE(6) logs by default */ + BUG_ON(sbi->active_logs != NR_CURSEG_TYPE); + return __get_segment_type_6(page, p_type); } static void do_write_page(struct f2fs_sb_info *sbi, struct page *page, |