summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-20 19:01:06 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-03-27 09:16:06 +0900
commit6ead114232f786e3ef7a034c8617f2a4df8e5226 (patch)
tree4ce177b708f8e98b148658a21d35fbec8bdc1e6b /fs/f2fs/super.c
parent111d2495a8a8fbd8e3bb0f1c1c60f977b1386249 (diff)
f2fs: fix the recovery flow to handle errors correctly
We should handle errors during the recovery flow correctly. For example, if we get -ENOMEM, we should report a mount failure instead of conducting the remained mount procedure. Reviewed-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index c9ef88da072..252890ef8db 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -642,8 +642,13 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
}
/* recover fsynced data */
- if (!test_opt(sbi, DISABLE_ROLL_FORWARD))
- recover_fsync_data(sbi);
+ if (!test_opt(sbi, DISABLE_ROLL_FORWARD)) {
+ err = recover_fsync_data(sbi);
+ if (err) {
+ f2fs_msg(sb, KERN_ERR, "Failed to recover fsync data");
+ goto free_root_inode;
+ }
+ }
/* After POR, we can run background GC thread */
err = start_gc_thread(sbi);