diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 70e6a0844c6b..dd46893138b3 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1731,6 +1731,9 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi) static void f2fs_enable_checkpoint(struct f2fs_sb_info *sbi) { + /* we should flush all the data to keep data consistency */ + sync_inodes_sb(sbi->sb); + down_write(&sbi->gc_lock); f2fs_dirty_to_prefree(sbi);