diff options
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 4aa521aa9bc3..890e23d208a8 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c | |||
@@ -762,6 +762,12 @@ static void do_checkpoint(struct f2fs_sb_info *sbi, bool is_umount) | |||
762 | void *kaddr; | 762 | void *kaddr; |
763 | int i; | 763 | int i; |
764 | 764 | ||
765 | /* | ||
766 | * This avoids to conduct wrong roll-forward operations and uses | ||
767 | * metapages, so should be called prior to sync_meta_pages below. | ||
768 | */ | ||
769 | discard_next_dnode(sbi); | ||
770 | |||
765 | /* Flush all the NAT/SIT pages */ | 771 | /* Flush all the NAT/SIT pages */ |
766 | while (get_pages(sbi, F2FS_DIRTY_META)) | 772 | while (get_pages(sbi, F2FS_DIRTY_META)) |
767 | sync_meta_pages(sbi, META, LONG_MAX); | 773 | sync_meta_pages(sbi, META, LONG_MAX); |