Re: [PATCH 3/3] mm: remove page_mapped()

Andrew Morton
2026-04-27T13:21:39Z

On Mon, 27 Apr 2026 13:43:16 +0200 "David Hildenbrand (Arm)" <david@kernel.org> wrote:

> Let's replace the last user of page_mapped() by folio_mapped() so we
> can get rid of page_mapped().
>
> Replace the remaining occurrences of page_mapped() in rmap documentation
> by folio_mapped().

This broke Breno's "mm/memory-failure: add panic option for
unrecoverable pages"
(https://lore.kernel.org/20260424-ecc_panic-v5-2-a35f4b50425c@debian.org),
which added a new page_mapped() call. I made the below adjustment to
Breno's patch:

--- a/mm/memory-failure.c~mm-memory-failure-add-panic-option-for-unrecoverable-pages-fix
+++ a/mm/memory-failure.c
@@ -1353,7 +1353,7 @@ static bool panic_on_unrecoverable_mf(un
cpu_relax();
return page_count(p) == 0 &&
!PageLRU(p) &&
- !page_mapped(p) &&
+ !folio_mapped(page_folio(p)) &&
!page_folio(p)->mapping &&
!is_free_buddy_page(p);
default:
_