Skip to content

Commit aff6fbb

Browse files
chaseyuJaegeuk Kim
authored andcommitted
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 <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 9627a7b commit aff6fbb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/f2fs/checkpoint.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,9 +1515,10 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
15151515

15161516
/*
15171517
* invalidate intermediate page cache borrowed from meta inode which are
1518-
* used for migration of encrypted or verity inode's blocks.
1518+
* used for migration of encrypted, verity or compressed inode's blocks.
15191519
*/
1520-
if (f2fs_sb_has_encrypt(sbi) || f2fs_sb_has_verity(sbi))
1520+
if (f2fs_sb_has_encrypt(sbi) || f2fs_sb_has_verity(sbi) ||
1521+
f2fs_sb_has_compression(sbi))
15211522
invalidate_mapping_pages(META_MAPPING(sbi),
15221523
MAIN_BLKADDR(sbi), MAX_BLKADDR(sbi) - 1);
15231524

0 commit comments

Comments
 (0)