On Tue, Aug 15, 2023 at 09:40:58AM +0200, David Hildenbrand wrote: > > @@ -624,6 +621,11 @@ void destroy_large_folio(struct folio *folio) > > return; > > } > > + if (folio_test_transhuge(folio) && dtor == TRANSHUGE_PAGE_DTOR) { > > + free_transhuge_folio(folio); > > I really wonder if folio_test_transhuge() should be written similar to > folio_test_hugetlb() instead, such that the dtor check is implicit. > > Any good reasons not to do that? Actually, we should probably delete folio_test_transhuge(). I'll tack a patch onto the end of this series to do that. I want to avoid a reference to free_transhuge_folio() if !CONFIG_TRANSPARENT_HUGEPAGE and folio_test_transhuge() accomplishes that by way of TESTPAGEFLAG_FALSE in page-flags. But so does folio_test_deferred_list() which is what we're getting to by the end of this series. So I'll leave this patch alone for now (other than fixing up the buildbot errors).