No particular advantage for this function, but necessary to remove shmem_getpage_gfp(). Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> --- mm/shmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index e41214dcb137..f9654008950e 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2063,6 +2063,7 @@ static vm_fault_t shmem_fault(struct vm_fault *vmf) struct vm_area_struct *vma = vmf->vma; struct inode *inode = file_inode(vma->vm_file); gfp_t gfp = mapping_gfp_mask(inode->i_mapping); + struct folio *folio; int err; vm_fault_t ret = VM_FAULT_LOCKED; @@ -2125,10 +2126,11 @@ static vm_fault_t shmem_fault(struct vm_fault *vmf) spin_unlock(&inode->i_lock); } - err = shmem_getpage_gfp(inode, vmf->pgoff, &vmf->page, SGP_CACHE, + err = shmem_get_folio_gfp(inode, vmf->pgoff, &folio, SGP_CACHE, gfp, vma, vmf, &ret); if (err) return vmf_error(err); + vmf->page = folio_file_page(folio, vmf->pgoff); return ret; } -- 2.35.1