f2fs: support POSIX_FADV_DONTNEED drop compressed page cache
authorFengnan Chang <changfengnan@vivo.com>
Mon, 29 Nov 2021 02:13:41 +0000 (10:13 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 10 Dec 2021 23:48:32 +0000 (15:48 -0800)
commite64347ae13dadba7b847776521a51c94c56605e9
tree0395168435cca7b25497c159fff6f830e6e3d919
parentd1917865a7906baf6b687e15e8e6195a295a3992
f2fs: support POSIX_FADV_DONTNEED drop compressed page cache

Previously, compressed page cache drop when clean page cache, but
POSIX_FADV_DONTNEED can't clean compressed page cache because raw page
don't have private data, and won't call f2fs_invalidate_compress_pages.
This commit call f2fs_invalidate_compress_pages() directly in
f2fs_file_fadvise() for POSIX_FADV_DONTNEED case.

Signed-off-by: Fengnan Chang <changfengnan@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c