summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-05-19 20:57:21 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2016-05-20 20:43:04 +0200
commit975756c41332bc5e523e9f843271ed5ab6aaaaaa (patch)
tree079297f9db49859dd8f43047bbc714f493fa9f33 /fs/f2fs/recovery.c
parentf2fs: make exit_f2fs_fs more clear (diff)
downloadlinux-975756c41332bc5e523e9f843271ed5ab6aaaaaa.tar.xz
linux-975756c41332bc5e523e9f843271ed5ab6aaaaaa.zip
f2fs: avoid ENOSPC fault in the recovery process
This patch avoids impossible error injection, ENOSPC, during recovery process. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index f89b70e72004..3d7216d7a288 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -470,6 +470,10 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
if (src == NULL_ADDR) {
err = reserve_new_block(&dn);
+#ifdef CONFIG_F2FS_FAULT_INJECTION
+ while (err)
+ err = reserve_new_block(&dn);
+#endif
/* We should not get -ENOSPC */
f2fs_bug_on(sbi, err);
}