diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2023-01-11 17:29:05 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-02-03 09:32:58 +0300 |
commit | f04029f34e8c3750b8fb39b54e788b9355d1b912 (patch) | |
tree | f8827d41b23bf040825d218fc15fc8f4206bee84 | |
parent | bad6da64565846ef5ba85b0b685cfde9db0085dc (diff) | |
download | linux-f04029f34e8c3750b8fb39b54e788b9355d1b912.tar.xz |
mm: convert is_transparent_hugepage() to use a folio
Replace a use of page->compound_dtor with its folio equivalent.
Link: https://lkml.kernel.org/r/20230111142915.1001531-20-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | mm/huge_memory.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 9570f03cdee4..bfa960f012fa 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -591,12 +591,14 @@ void prep_transhuge_page(struct page *page) static inline bool is_transparent_hugepage(struct page *page) { + struct folio *folio; + if (!PageCompound(page)) return false; - page = compound_head(page); - return is_huge_zero_page(page) || - page[1].compound_dtor == TRANSHUGE_PAGE_DTOR; + folio = page_folio(page); + return is_huge_zero_page(&folio->page) || + folio->_folio_dtor == TRANSHUGE_PAGE_DTOR; } static unsigned long __thp_get_unmapped_area(struct file *filp, |