Commit 047184b42b52376f4066f9ab357c0a61a12f116e
Committed by
Jaegeuk Kim
1 parent
bde582b225
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff
fs/f2fs/recovery.c
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | |
54 | 54 | dir = f2fs_iget(inode->i_sb, le32_to_cpu(raw_inode->i_pino)); |
55 | 55 | if (IS_ERR(dir)) { |
56 | - err = -EINVAL; | |
56 | + err = PTR_ERR(dir); | |
57 | 57 | goto out; |
58 | 58 | } |
59 | 59 | |
60 | 60 | |
... | ... | @@ -156,8 +156,12 @@ |
156 | 156 | } |
157 | 157 | if (IS_INODE(page)) { |
158 | 158 | err = recover_inode(entry->inode, page); |
159 | - if (err) | |
159 | + if (err == -ENOENT) { | |
160 | + goto next; | |
161 | + } else if (err) { | |
162 | + err = -EINVAL; | |
160 | 163 | goto unlock_out; |
164 | + } | |
161 | 165 | } |
162 | 166 | next: |
163 | 167 | /* check next segment */ |