소스 검색

f2fs: don't do checkpoint if error is occurred

If we met an error during the dentry recovery, we should not conduct checkpoint.
Otherwise, some errorneous dentry blocks overwrites the existing blocks that
contain the remaining recovery information.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Jaegeuk Kim 12 년 전
부모
커밋
2c2c149f7d
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      fs/f2fs/recovery.c

+ 2 - 1
fs/f2fs/recovery.c

@@ -403,6 +403,7 @@ out:
 	destroy_fsync_dnodes(sbi, &inode_list);
 	kmem_cache_destroy(fsync_entry_slab);
 	sbi->por_doing = 0;
-	write_checkpoint(sbi, false);
+	if (!err)
+		write_checkpoint(sbi, false);
 	return err;
 }