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>
Fri, 25 Feb 2022 14:10:23 +0000 (09:10 -0500)
commit29f5251267bd64d441d579b1bf4302a488476f8f
treebf72d63fe2124eaa556dafd4e04f315cddede4a8
parent11e95e239ec170a30071487dbf0bb7168339c148
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