diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-02-03 11:40:17 -0500 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-03-21 12:59:02 -0400 |
commit | 2aff7a4755bed2870ee23b75bc88cdc8d76cdd03 (patch) | |
tree | a638ee31555747a2252b02e87440dfa303b9f64e /include/linux/hugetlb.h | |
parent | aef13dec0a5fa3c4adc8949307fc8d8aac7337df (diff) | |
download | linux-stable-2aff7a4755bed2870ee23b75bc88cdc8d76cdd03.tar.gz linux-stable-2aff7a4755bed2870ee23b75bc88cdc8d76cdd03.tar.bz2 linux-stable-2aff7a4755bed2870ee23b75bc88cdc8d76cdd03.zip |
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>
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r-- | include/linux/hugetlb.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index d1897a69c540..6ba2f8e74fbb 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -970,6 +970,11 @@ static inline struct hstate *page_hstate(struct page *page) return NULL; } +static inline struct hstate *size_to_hstate(unsigned long size) +{ + return NULL; +} + static inline unsigned long huge_page_size(struct hstate *h) { return PAGE_SIZE; |