Re: [PATCH 6/9] mm/hugetlb: convert free_huge_page to folios

From: Andrew Morton
Date: Mon Oct 17 2022 - 16:38:41 EST


On Thu, 13 Oct 2022 20:13:00 -0700 Sidhartha Kumar <sidhartha.kumar@xxxxxxxxxx> wrote:

> Use folios inside free_huge_page(), this is in preparation for converting
> hugetlb_cgroup_uncharge_page() to take in a folio.

I added this build fix.

--- a/mm/hugetlb.c~mm-hugetlb-convert-free_huge_page-to-folios-fix
+++ a/mm/hugetlb.c
@@ -1704,7 +1704,7 @@ void free_huge_page(struct page *page)
unsigned long flags;

VM_BUG_ON_FOLIO(folio_ref_count(folio), folio);
- VM_BUG_ON_PAGE(folio_mapcount(folio), folio);
+ VM_BUG_ON_FOLIO(folio_mapcount(folio), folio);

hugetlb_set_folio_subpool(folio, NULL);
if (folio_test_anon(folio))
_