mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
f2fs: avoid unnecessary checkpoints
During the f2fs_put_super procedure, we don't need to conduct checkpoint all the time, since we don't need to do that if superblock is clean. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
parent
4058c5117d
commit
5887d291d7
@ -372,7 +372,9 @@ static void f2fs_put_super(struct super_block *sb)
|
||||
f2fs_destroy_stats(sbi);
|
||||
stop_gc_thread(sbi);
|
||||
|
||||
write_checkpoint(sbi, true);
|
||||
/* We don't need to do checkpoint when it's clean */
|
||||
if (sbi->s_dirty && get_pages(sbi, F2FS_DIRTY_NODES))
|
||||
write_checkpoint(sbi, true);
|
||||
|
||||
iput(sbi->node_inode);
|
||||
iput(sbi->meta_inode);
|
||||
|
Loading…
Reference in New Issue
Block a user