Commit 047184b4 authored by Chris Fries's avatar Chris Fries Committed by Jaegeuk Kim

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: default avatarChris Fries <C.Fries@motorola.com>
Reviewed-by: default avatarRussell Knize <rknize2@motorola.com>
Reviewed-by: default avatarJason Hrycay <jason.hrycay@motorola.com>
[Jaegeuk Kim: fit the coding style]
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent bde582b2
......@@ -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,9 +156,13 @@ 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 */
blkaddr = next_blkaddr_of_node(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment