f2fs: put directory inodes before checkpoint in roll-forward recovery
commit 9e1e6df412a28cdbbd2909de5c6189eda4a3383d upstream. Before checkpoint, we'd be better drop any inodes. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2f958b8e22
commit
9213c2b511
@ -597,6 +597,9 @@ out:
|
||||
set_ckpt_flags(sbi->ckpt, CP_ERROR_FLAG);
|
||||
mutex_unlock(&sbi->cp_mutex);
|
||||
|
||||
/* let's drop all the directory inodes for clean checkpoint */
|
||||
destroy_fsync_dnodes(&dir_list);
|
||||
|
||||
if (!err && need_writecp) {
|
||||
struct cp_control cpc = {
|
||||
.reason = CP_RECOVERY,
|
||||
@ -604,7 +607,6 @@ out:
|
||||
write_checkpoint(sbi, &cpc);
|
||||
}
|
||||
|
||||
destroy_fsync_dnodes(&dir_list);
|
||||
kmem_cache_destroy(fsync_entry_slab);
|
||||
return ret ? ret: err;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user