f2fs: don't drop compressed page cache in .{invalidate,release}page
authorChao Yu <chao@kernel.org>
Thu, 16 Dec 2021 09:13:56 +0000 (17:13 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Jan 2022 21:20:57 +0000 (13:20 -0800)
commit2a64e303e3051550c75897239174e399dfcb8b7e
tree8c6d006a436a1daaf17c1882e163c556fab26147
parent300a842937fbcfb5a189cea9ba15374fdb0b5c6b
f2fs: don't drop compressed page cache in .{invalidate,release}page

For compressed inode, in .{invalidate,release}page, we will call
f2fs_invalidate_compress_pages() to drop all compressed page cache of
current inode.

But we don't need to drop compressed page cache synchronously in
.invalidatepage, because, all trancation paths of compressed physical
block has been covered with f2fs_invalidate_compress_page().

And also we don't need to drop compressed page cache synchronously
in .releasepage, because, if there is out-of-memory, we can count
on page cache reclaim on sbi->compress_inode.

BTW, this patch may fix the issue reported below:

https://lore.kernel.org/linux-f2fs-devel/20211202092812.197647-1-changfengnan@vivo.com/T/#u

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c