This is a note to let you know that I've just added the patch titled f2fs: fix remove page failed in invalidate compress pages to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: f2fs-fix-remove-page-failed-in-invalidate-compress-pages.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d1917865a7906baf6b687e15e8e6195a295a3992 Mon Sep 17 00:00:00 2001 From: Fengnan Chang <changfengnan@xxxxxxxx> Date: Fri, 26 Nov 2021 18:19:19 +0800 Subject: f2fs: fix remove page failed in invalidate compress pages From: Fengnan Chang <changfengnan@xxxxxxxx> commit d1917865a7906baf6b687e15e8e6195a295a3992 upstream. Since compress inode not a regular file, generic_error_remove_page in f2fs_invalidate_compress_pages will always be failed, set compress inode as a regular file to fix it. Fixes: 6ce19aff0b8c ("f2fs: compress: add compress_inode to cache compressed blocks") Signed-off-by: Fengnan Chang <changfengnan@xxxxxxxx> Reviewed-by: Chao Yu <chao@xxxxxxxxxx> Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/f2fs/inode.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -516,6 +516,11 @@ make_now: } else if (ino == F2FS_COMPRESS_INO(sbi)) { #ifdef CONFIG_F2FS_FS_COMPRESSION inode->i_mapping->a_ops = &f2fs_compress_aops; + /* + * generic_error_remove_page only truncates pages of regular + * inode + */ + inode->i_mode |= S_IFREG; #endif mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS | __GFP_HIGHMEM | __GFP_MOVABLE); Patches currently in stable-queue which might be from changfengnan@xxxxxxxx are queue-5.15/f2fs-fix-remove-page-failed-in-invalidate-compress-pages.patch