From: Jaegeuk Kim Date: Wed, 20 Jul 2016 02:30:06 +0000 (-0700) Subject: f2fs: handle error case with f2fs_bug_on X-Git-Tag: v4.8-rc1~145^2~2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=6f3ec9952c13f0adf632e89456df43946cec6525;p=linux.git 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 --- diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 5d4461f2c266..9e652d5a659b 100644 --- a/fs/f2fs/recovery.c +++ b/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 */