mm: Convert page_vma_mapped_walk to work on PFNs
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 3 Feb 2022 16:40:17 +0000 (11:40 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 21 Mar 2022 16:59:02 +0000 (12:59 -0400)
commit2aff7a4755bed2870ee23b75bc88cdc8d76cdd03
treea638ee31555747a2252b02e87440dfa303b9f64e
parentaef13dec0a5fa3c4adc8949307fc8d8aac7337df
mm: Convert page_vma_mapped_walk to work on PFNs

page_mapped_in_vma() really just wants to walk one page, but as the
code stands, if passed the head page of a compound page, it will
walk every page in the compound page.  Extract pfn/nr_pages/pgoff
from the struct page early, so they can be overridden by
page_mapped_in_vma().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
include/linux/hugetlb.h
include/linux/rmap.h
mm/internal.h
mm/migrate.c
mm/page_vma_mapped.c
mm/rmap.c