Skip to content

Commit

Permalink
f2fs: recover when journal contains deleted files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Fries authored and Jaegeuk Kim committed May 8, 2013
1 parent bde582b commit 047184b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fs/f2fs/recovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 047184b

Please sign in to comment.