Do we have some limit that we must use exported symbol to make f2fs must can 
load as a module? If no, maybe we can just use truncate_inode_page to replace 
generic_error_remove_page ?

> -----Original Message-----
> From: 常凤楠
> Sent: Wednesday, November 24, 2021 4:39 PM
> To: [email protected]; [email protected]
> Cc: [email protected]; 常凤楠 <[email protected]>
> Subject: [PATCH 1/2] f2fs: fix remove page failed in invalidate compress pages
> 
> 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.
> 
> Signed-off-by: Fengnan Chang <[email protected]>
> ---
>  fs/f2fs/inode.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 
> 0f8b2df3e1e0..7ea76784efcc
> 100644
> --- a/fs/f2fs/inode.c
> +++ b/fs/f2fs/inode.c
> @@ -516,6 +516,7 @@ struct inode *f2fs_iget(struct super_block *sb,
> unsigned long ino)
>       } else if (ino == F2FS_COMPRESS_INO(sbi)) {  #ifdef
> CONFIG_F2FS_FS_COMPRESSION
>               inode->i_mapping->a_ops = &f2fs_compress_aops;
> +             inode->i_mode |= S_IFREG;
>  #endif
>               mapping_set_gfp_mask(inode->i_mapping,
>                       GFP_NOFS | __GFP_HIGHMEM | __GFP_MOVABLE);
> --
> 2.32.0


_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to