diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-19 18:13:54 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-30 10:05:49 -0700 |
commit | 9e1e6df412a28cdbbd2909de5c6189eda4a3383d (patch) | |
tree | 6b0858b392e2f9069965c0de1c62aa018948dd18 /fs/f2fs | |
parent | a468f0ef516fda9c7d91bb550d458e853d76955e (diff) | |
download | op-kernel-dev-9e1e6df412a28cdbbd2909de5c6189eda4a3383d.zip op-kernel-dev-9e1e6df412a28cdbbd2909de5c6189eda4a3383d.tar.gz |
f2fs: put directory inodes before checkpoint in roll-forward recovery
Before checkpoint, we'd be better drop any inodes.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/recovery.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 2b8a56d..509273a 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -630,6 +630,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, @@ -637,7 +640,6 @@ out: err = write_checkpoint(sbi, &cpc); } - destroy_fsync_dnodes(&dir_list); kmem_cache_destroy(fsync_entry_slab); return ret ? ret: err; } |