diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-07-07 04:35:41 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-07-09 08:28:34 +0300 |
commit | aff6fbbe8e1b62af381f443291fd15fd16e17805 (patch) | |
tree | 0460337bece8f0bc9d755fb718a2fdf4dca76e6c /fs/f2fs/checkpoint.c | |
parent | 9627a7b31f3c4ff8bc8f3be3683983ffe6eaebe6 (diff) | |
download | linux-aff6fbbe8e1b62af381f443291fd15fd16e17805.tar.xz |
f2fs: don't keep meta inode pages used for compressed block migration
meta inode's pages are used for encrypted, verity and compressed blocks,
so the meta inode's cache invalidation condition in do_checkpoint() should
consider compression as well, not just for verity and encryption, fix it.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 236064930251..8f5753cc3037 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -1515,9 +1515,10 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) /* * invalidate intermediate page cache borrowed from meta inode which are - * used for migration of encrypted or verity inode's blocks. + * used for migration of encrypted, verity or compressed inode's blocks. */ - if (f2fs_sb_has_encrypt(sbi) || f2fs_sb_has_verity(sbi)) + if (f2fs_sb_has_encrypt(sbi) || f2fs_sb_has_verity(sbi) || + f2fs_sb_has_compression(sbi)) invalidate_mapping_pages(META_MAPPING(sbi), MAIN_BLKADDR(sbi), MAX_BLKADDR(sbi) - 1); |