xfs: add file_{get,put}_folio

Add helper similar to file_{get,set}_page, but which deal with folios
and don't allocate new folio unless explicitly asked to, which map
to shmem_get_folio instead of calling into the aops.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
This commit is contained in:
Darrick J. Wong 2024-02-19 07:27:26 +01:00 • committed by Chandan Babu R
commit 6907e3c00a
3 changed files with 83 additions and 0 deletions