]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
mm: Convert is_transparent_hugepage() to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 4 Sep 2022 23:57:49 +0000 (19:57 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 3 Jan 2023 04:00:56 +0000 (23:00 -0500)
Replace a use of page->compound_dtor with its folio equivalent.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
mm/huge_memory.c

index ca2eaec84726b71b0104a1636c7cb90579f48add..c3a0964cf12745c664eee72aff47ad20a425a5c7 100644 (file)
@@ -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,