From 2c2c149f7dabd5a4d41cae5d2c2ce1d130acf72c Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 20 May 2013 14:48:49 +0900 Subject: 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 --- fs/f2fs/recovery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 3a4b51c03321..5148d90049b0 100644 --- a/fs/f2fs/recovery.c +++ b/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; } -- cgit v1.2.3