aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index b07e9b6ef376..b571fee677d5 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -144,14 +144,15 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
144 goto out; 144 goto out;
145 } 145 }
146 146
147 INIT_LIST_HEAD(&entry->list);
148 list_add_tail(&entry->list, head);
149
150 entry->inode = f2fs_iget(sbi->sb, ino_of_node(page)); 147 entry->inode = f2fs_iget(sbi->sb, ino_of_node(page));
151 if (IS_ERR(entry->inode)) { 148 if (IS_ERR(entry->inode)) {
152 err = PTR_ERR(entry->inode); 149 err = PTR_ERR(entry->inode);
150 kmem_cache_free(fsync_entry_slab, entry);
153 goto out; 151 goto out;
154 } 152 }
153
154 INIT_LIST_HEAD(&entry->list);
155 list_add_tail(&entry->list, head);
155 entry->blkaddr = blkaddr; 156 entry->blkaddr = blkaddr;
156 } 157 }
157 if (IS_INODE(page)) { 158 if (IS_INODE(page)) {
@@ -228,6 +229,9 @@ static void check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
228 229
229 /* Deallocate previous index in the node page */ 230 /* Deallocate previous index in the node page */
230 inode = f2fs_iget_nowait(sbi->sb, ino); 231 inode = f2fs_iget_nowait(sbi->sb, ino);
232 if (IS_ERR(inode))
233 return;
234
231 truncate_hole(inode, bidx, bidx + 1); 235 truncate_hole(inode, bidx, bidx + 1);
232 iput(inode); 236 iput(inode);
233} 237}