diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 7e3c79e79e5b..97cb95820592 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -653,13 +653,8 @@ static inline unsigned int order_to_pindex(int migratetype, int order) if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { bool movable = migratetype == MIGRATE_MOVABLE; - if (order > PAGE_ALLOC_COSTLY_ORDER) { - VM_BUG_ON(!is_pmd_order(order)); - + if (order > PAGE_ALLOC_COSTLY_ORDER) return NR_LOWORDER_PCP_LISTS + movable; - } - } else { - VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER); } return (MIGRATE_PCPTYPES * order) + migratetype; @@ -672,8 +667,6 @@ static inline int pindex_to_order(unsigned int pindex) if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) { if (pindex >= NR_LOWORDER_PCP_LISTS) order = HPAGE_PMD_ORDER; - } else { - VM_BUG_ON(order > PAGE_ALLOC_COSTLY_ORDER); } return order;