hugetlb: remove a few calls to page_folio()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 24 Aug 2023 14:13:24 +0000 (15:13 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:32:31 +0000 (10:32 -0700)
commit04bbfd844b99c7c89a344236d3758e7a2d41572f
treec1d60e3886d8d8c1520ad511801dd131adce5ad9
parent3ec145f9d01e799bc7e41277e571141546b850f3
hugetlb: remove a few calls to page_folio()

Anything found on a linked list threaded through ->lru is guaranteed to be
a folio as the compound_head found in a tail page overlaps the ->lru
member of struct page.  So we can pull folios directly off these lists no
matter whether pages or folios were added to the list.

Link: https://lkml.kernel.org/r/20230824141325.2704553-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c