Re: [PATCH v2] f2fs: Use mapping->gfp_mask to get file cache for writing
From: Chao Yu
Date: Fri Oct 10 2025 - 07:22:36 EST
On 10/10/25 18:45, Jiucheng Xu via B4 Relay wrote:
> From: Jiucheng Xu <jiucheng.xu@xxxxxxxxxxx>
>
> On 32-bit architectures, when GFP_NOFS is used, the file cache for write
> operations cannot be allocated from the highmem and CMA.
>
> Since mapping->gfp_mask is set to GFP_HIGHUSER_MOVABLE during inode
> allocation, using mapping_gfp_mask(mapping) as the GFP flag of getting file
> cache for writing is more efficient for 32-bit architectures.
>
> Additionally, use FGP_NOFS to avoid potential deadlock issues caused by
> GFP_FS in GFP_HIGHUSER_MOVABLE
>
> Signed-off-by: Jiucheng Xu <jiucheng.xu@xxxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Thanks,