浏览代码

f2fs: handle error case with f2fs_bug_on

It's enough to show BUG or WARN by f2fs_bug_on for error case.
Then, we don't need to remain corrupted filesystem.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Jaegeuk Kim 9 年之前
父节点
当前提交
6f3ec9952c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/f2fs/recovery.c

+ 2 - 0
fs/f2fs/recovery.c

@@ -482,6 +482,8 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
 #endif
 				/* We should not get -ENOSPC */
 				f2fs_bug_on(sbi, err);
+				if (err)
+					goto err;
 			}
 
 			/* Check the previous node page having this index */