Skip to content

Commit 2b64289

Browse files
Fengnan ChangJaegeuk Kim
authored andcommitted
f2fs: remove redunant invalidate compress pages
Compress page will invalidate in truncate block process too, so remove redunant invalidate compress pages in f2fs_evict_inode. Signed-off-by: Fengnan Chang <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent d361b69 commit 2b64289

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/f2fs/inode.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,8 @@ void f2fs_evict_inode(struct inode *inode)
751751
trace_f2fs_evict_inode(inode);
752752
truncate_inode_pages_final(&inode->i_data);
753753

754-
if (test_opt(sbi, COMPRESS_CACHE) && f2fs_compressed_file(inode))
754+
if ((inode->i_nlink || is_bad_inode(inode)) &&
755+
test_opt(sbi, COMPRESS_CACHE) && f2fs_compressed_file(inode))
755756
f2fs_invalidate_compress_pages(sbi, inode->i_ino);
756757

757758
if (inode->i_ino == F2FS_NODE_INO(sbi) ||

0 commit comments

Comments
 (0)