diff options
author | Eric Biggers <ebiggers@google.com> | 2019-12-09 12:00:55 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-01-15 13:43:48 -0800 |
commit | 542989b6749b69e9de59a9d41a9ee9af7dbb1986 (patch) | |
tree | 1c37ec535dd087eff26bf7fa38eb04be66b40e44 | |
parent | f543805fcd60f3f9a491cfa2f2dc9284d2569c28 (diff) |
f2fs: don't keep META_MAPPING pages used for moving verity file blocks
META_MAPPING is used to move blocks for both encrypted and verity files.
So the META_MAPPING invalidation condition in do_checkpoint() should
consider verity too, not just encrypt.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/checkpoint.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index ffdaba0c55d2..44e84ac5c941 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c @@ -1509,10 +1509,10 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc) f2fs_wait_on_all_pages_writeback(sbi); /* - * invalidate intermediate page cache borrowed from meta inode - * which are used for migration of encrypted inode's blocks. + * invalidate intermediate page cache borrowed from meta inode which are + * used for migration of encrypted or verity inode's blocks. */ - if (f2fs_sb_has_encrypt(sbi)) + if (f2fs_sb_has_encrypt(sbi) || f2fs_sb_has_verity(sbi)) invalidate_mapping_pages(META_MAPPING(sbi), MAIN_BLKADDR(sbi), MAX_BLKADDR(sbi) - 1); |