Browse Source

f2fs: avoid wrong error during recovery

During the roll-forward recovery, -ENOENT for f2fs_iget can be skipped.
So, this error value should not be propagated.

Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Jaegeuk Kim 10 years ago
parent
commit
8fbc418f99
1 changed files with 3 additions and 1 deletions
  1. 3 1
      fs/f2fs/recovery.c

+ 3 - 1
fs/f2fs/recovery.c

@@ -212,8 +212,10 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
 			if (IS_ERR(entry->inode)) {
 			if (IS_ERR(entry->inode)) {
 				err = PTR_ERR(entry->inode);
 				err = PTR_ERR(entry->inode);
 				kmem_cache_free(fsync_entry_slab, entry);
 				kmem_cache_free(fsync_entry_slab, entry);
-				if (err == -ENOENT)
+				if (err == -ENOENT) {
+					err = 0;
 					goto next;
 					goto next;
+				}
 				break;
 				break;
 			}
 			}
 			list_add_tail(&entry->list, head);
 			list_add_tail(&entry->list, head);