The patch titled Subject: shmem-convert-shmem_fault-to-use-shmem_get_folio_gfp-fix has been added to the -mm mm-unstable branch. Its filename is shmem-convert-shmem_fault-to-use-shmem_get_folio_gfp-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/shmem-convert-shmem_fault-to-use-shmem_get_folio_gfp-fix.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Hugh Dickins <hughd@xxxxxxxxxx> Subject: shmem-convert-shmem_fault-to-use-shmem_get_folio_gfp-fix Date: Fri, 23 Sep 2022 17:14:38 -0700 (PDT) Link: https://lkml.kernel.org/r/7693a84-bdc2-27b5-2695-d0fe8566571f@xxxxxxxxxx Cc: Axel Rasmussen <axelrasmussen@xxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: Muchun Song <songmuchun@xxxxxxxxxxxxx> Cc: Nathan Chancellor <nathan@xxxxxxxxxx> Cc: Nick Desaulniers <ndesaulniers@xxxxxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> Cc: Tom Rix <trix@xxxxxxxxxx> Cc: Yang Shi <shy828301@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/mm/shmem.c~shmem-convert-shmem_fault-to-use-shmem_get_folio_gfp-fix +++ a/mm/shmem.c @@ -2065,7 +2065,7 @@ static vm_fault_t shmem_fault(struct vm_ 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; + struct folio *folio = NULL; int err; vm_fault_t ret = VM_FAULT_LOCKED; @@ -2132,7 +2132,8 @@ static vm_fault_t shmem_fault(struct vm_ gfp, vma, vmf, &ret); if (err) return vmf_error(err); - vmf->page = folio_file_page(folio, vmf->pgoff); + if (folio) + vmf->page = folio_file_page(folio, vmf->pgoff); return ret; } _ Patches currently in -mm which might be from hughd@xxxxxxxxxx are shmem-convert-shmem_fault-to-use-shmem_get_folio_gfp-fix.patch