diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 0c6745a6a13a..532a840a4266 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3298,6 +3298,9 @@ static void __init hugetlb_hstate_alloc_pages(struct hstate *h) return; } + if (!h->max_huge_pages) + return; + /* do node specific alloc */ for_each_online_node(i) { if (h->max_huge_pages_node[i] > 0) {