thp: remove HPAGE_PMD_ORDER minimum assertion
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 29 Apr 2024 19:00:55 +0000 (20:00 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 7 May 2024 17:37:02 +0000 (10:37 -0700)
We now handle order-1 folios correctly, so we don't need this assertion
any more.

Link: https://lkml.kernel.org/r/20240429190114.3126789-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c

index ccdcff73284a028bb287a78561c00f7239ea3c94..317de2afd37181eb81bda4c9815213039a8c5586 100644 (file)
@@ -740,11 +740,6 @@ static int __init hugepage_init(void)
         * hugepages can't be allocated by the buddy allocator
         */
        MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER > MAX_PAGE_ORDER);
-       /*
-        * we use page->mapping and page->index in second tail page
-        * as list_head: assuming THP order >= 2
-        */
-       MAYBE_BUILD_BUG_ON(HPAGE_PMD_ORDER < 2);
 
        err = hugepage_init_sysfs(&hugepage_kobj);
        if (err)