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, 4 insertions, 6 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index b571fee677d5..f42e4060b399 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -67,7 +67,7 @@ static int recover_dentry(struct page *ipage, struct inode *inode)
67 kunmap(page); 67 kunmap(page);
68 f2fs_put_page(page, 0); 68 f2fs_put_page(page, 0);
69 } else { 69 } else {
70 f2fs_add_link(&dent, inode); 70 err = f2fs_add_link(&dent, inode);
71 } 71 }
72 iput(dir); 72 iput(dir);
73out: 73out:
@@ -151,7 +151,6 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
151 goto out; 151 goto out;
152 } 152 }
153 153
154 INIT_LIST_HEAD(&entry->list);
155 list_add_tail(&entry->list, head); 154 list_add_tail(&entry->list, head);
156 entry->blkaddr = blkaddr; 155 entry->blkaddr = blkaddr;
157 } 156 }
@@ -174,10 +173,9 @@ out:
174static void destroy_fsync_dnodes(struct f2fs_sb_info *sbi, 173static void destroy_fsync_dnodes(struct f2fs_sb_info *sbi,
175 struct list_head *head) 174 struct list_head *head)
176{ 175{
177 struct list_head *this; 176 struct fsync_inode_entry *entry, *tmp;
178 struct fsync_inode_entry *entry; 177
179 list_for_each(this, head) { 178 list_for_each_entry_safe(entry, tmp, head, list) {
180 entry = list_entry(this, struct fsync_inode_entry, list);
181 iput(entry->inode); 179 iput(entry->inode);
182 list_del(&entry->list); 180 list_del(&entry->list);
183 kmem_cache_free(fsync_entry_slab, entry); 181 kmem_cache_free(fsync_entry_slab, entry);