aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorChris Fries <C.Fries@motorola.com>2013-05-02 16:09:05 -0500
committerAndreas Blaesius <skate4life@gmx.de>2016-06-05 21:20:17 +0200
commitef74ccd777cb9153eecca53be731fc6f12234345 (patch)
tree12fe0b8273f38476cbfc49fdcb35c6d70aa5d12d /fs/f2fs/recovery.c
parenteb2a3641c55257f1c28f05a05250f4c6bfb45083 (diff)
downloadkernel_samsung_espresso10-ef74ccd777cb9153eecca53be731fc6f12234345.zip
kernel_samsung_espresso10-ef74ccd777cb9153eecca53be731fc6f12234345.tar.gz
kernel_samsung_espresso10-ef74ccd777cb9153eecca53be731fc6f12234345.tar.bz2
f2fs: recover when journal contains deleted files
When recovering a journal file with fsync data for files that have been deleted, don't bail out on recovery. Signed-off-by: Chris Fries <C.Fries@motorola.com> Reviewed-by: Russell Knize <rknize2@motorola.com> Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com> [Jaegeuk Kim: fit the coding style] Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index f16d12d..60c8a50 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -53,7 +53,7 @@ static int recover_dentry(struct page *ipage, struct inode *inode)
dir = f2fs_iget(inode->i_sb, le32_to_cpu(raw_inode->i_pino));
if (IS_ERR(dir)) {
- err = -EINVAL;
+ err = PTR_ERR(dir);
goto out;
}
@@ -156,8 +156,12 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
}
if (IS_INODE(page)) {
err = recover_inode(entry->inode, page);
- if (err)
+ if (err == -ENOENT) {
+ goto next;
+ } else if (err) {
+ err = -EINVAL;
goto unlock_out;
+ }
}
next:
/* check next segment */