Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5887d291 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

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: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 4058c511
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -372,6 +372,8 @@ static void f2fs_put_super(struct super_block *sb)
	f2fs_destroy_stats(sbi);
	f2fs_destroy_stats(sbi);
	stop_gc_thread(sbi);
	stop_gc_thread(sbi);


	/* 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);
		write_checkpoint(sbi, true);


	iput(sbi->node_inode);
	iput(sbi->node_inode);