diff --git a/mm/hugetlb.c b/mm/hugetlb.c index d87885eb4acc8eee8dab46ff84131ed712b1350d..832f676ca038837ab87c7544d4c3344b45cdc264 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -334,6 +334,7 @@ static unsigned long set_max_huge_pages(unsigned long count) return nr_huge_pages; spin_lock(&hugetlb_lock); + count = max(count, reserved_huge_pages); try_to_free_low(count); while (count < nr_huge_pages) { struct page *page = dequeue_huge_page(NULL, 0);