diff options
author | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-10-29 02:14:54 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-10-29 02:44:38 -0400 |
commit | 5d56b6718a0f4e5c58cdd3cb6b7a472d7c5671b9 (patch) | |
tree | c5648f1dccaff7edb642581ba9409e8fe427e5e3 /fs/f2fs/recovery.c | |
parent | 3b218e3a21ccec183472015f1d7168400b187a58 (diff) |
f2fs: add an option to avoid unnecessary BUG_ONs
If you want to remove unnecessary BUG_ONs, you can just turn off F2FS_CHECK_FS
in your kernel config.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r-- | fs/f2fs/recovery.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index b278c68b3e08..fdc81161f254 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c | |||
@@ -311,8 +311,8 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode, | |||
311 | wait_on_page_writeback(dn.node_page); | 311 | wait_on_page_writeback(dn.node_page); |
312 | 312 | ||
313 | get_node_info(sbi, dn.nid, &ni); | 313 | get_node_info(sbi, dn.nid, &ni); |
314 | BUG_ON(ni.ino != ino_of_node(page)); | 314 | f2fs_bug_on(ni.ino != ino_of_node(page)); |
315 | BUG_ON(ofs_of_node(dn.node_page) != ofs_of_node(page)); | 315 | f2fs_bug_on(ofs_of_node(dn.node_page) != ofs_of_node(page)); |
316 | 316 | ||
317 | for (; start < end; start++) { | 317 | for (; start < end; start++) { |
318 | block_t src, dest; | 318 | block_t src, dest; |
@@ -322,9 +322,9 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode, | |||
322 | 322 | ||
323 | if (src != dest && dest != NEW_ADDR && dest != NULL_ADDR) { | 323 | if (src != dest && dest != NEW_ADDR && dest != NULL_ADDR) { |
324 | if (src == NULL_ADDR) { | 324 | if (src == NULL_ADDR) { |
325 | int err = reserve_new_block(&dn); | 325 | err = reserve_new_block(&dn); |
326 | /* We should not get -ENOSPC */ | 326 | /* We should not get -ENOSPC */ |
327 | BUG_ON(err); | 327 | f2fs_bug_on(err); |
328 | } | 328 | } |
329 | 329 | ||
330 | /* Check the previous node page having this index */ | 330 | /* Check the previous node page having this index */ |
@@ -447,7 +447,7 @@ int recover_fsync_data(struct f2fs_sb_info *sbi) | |||
447 | 447 | ||
448 | /* step #2: recover data */ | 448 | /* step #2: recover data */ |
449 | err = recover_data(sbi, &inode_list, CURSEG_WARM_NODE); | 449 | err = recover_data(sbi, &inode_list, CURSEG_WARM_NODE); |
450 | BUG_ON(!list_empty(&inode_list)); | 450 | f2fs_bug_on(!list_empty(&inode_list)); |
451 | out: | 451 | out: |
452 | destroy_fsync_dnodes(&inode_list); | 452 | destroy_fsync_dnodes(&inode_list); |
453 | kmem_cache_destroy(fsync_entry_slab); | 453 | kmem_cache_destroy(fsync_entry_slab); |