mm-filemap-allow-pte_offset_map_lock-to-fail.patch removed from -mm tree
The quilt patch titled
Subject: mm/filemap: allow pte_offset_map_lock() to fail
has been removed from the -mm tree. Its filename was
mm-filemap-allow-pte_offset_map_lock-to-fail.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Hugh Dickins <[email protected]>
Subject: mm/filemap: allow pte_offset_map_lock() to fail
Date: Thu, 8 Jun 2023 18:11:29 -0700 (PDT)
filemap_map_pages() allow pte_offset_map_lock() to fail; and remove the pmd_devmap_trans_unstable() check from filemap_map_pmd(), which can safely return to filemap_map_pages() and let pte_offset_map_lock() discover that.
---
mm/filemap.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
mm/filemap.c renamed from mm/filemap.c~mm-filemap-allow-pte_offset_map_lock-to-fail +5 -7
@@ -3414,13 +3414,6 @@ static bool filemap_map_pmd(struct vm_faif (pmd_none (*vmf->pmd))pmd_install (mm, vmf->pmd, &vmf->prealloc_pte); -/* See comment in handle_pte_fault() */ -if (pmd_devmap_trans_unstable (vmf->pmd)) { -folio_unlock (folio); -folio_put (folio); -return true; - } -return false; }
@@ -3507,6 +3500,11 @@ vm_fault_t filemap_map_pages(struct vm_f addr = vma->vm_start + ((start_pgoff - vma->vm_pgoff) <<PAGE_SHIFT ); vmf->pte =pte_offset_map_lock (vma->vm_mm, vmf->pmd, addr, &vmf->ptl); +if (!vmf->pte) { +folio_unlock (folio); +folio_put (folio); + goto out; + } do { again: page = folio_file_page(folio, xas.xa_index);
_
Patches currently in -mm which might be from [email protected] are