xfs: use shmem_get_folio in in xfile_load
authorChristoph Hellwig <hch@lst.de>
Mon, 19 Feb 2024 06:27:25 +0000 (07:27 +0100)
committerChandan Babu R <chandanbabu@kernel.org>
Wed, 21 Feb 2024 06:06:54 +0000 (11:36 +0530)
commite97d70a57370817af59bb83f4219cd8aa63b81ed
treee31c05da1bf00c2e912e6ff1672141b5e401fdc4
parentfd2634e2dd4539f96ab9e037f62ad2828f7a15eb
xfs: use shmem_get_folio in in xfile_load

Switch to using shmem_get_folio in xfile_load instead of using
shmem_read_mapping_page_gfp.  This gets us support for large folios
and also optimized reading from unallocated space, as
shmem_get_folio with SGP_READ won't allocate a page for them just
to zero the content.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/scrub/xfile.c