diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 19f83ef14ee4dea57f554d8ca54ab17c8293e063..44b57cc363fff3e4c197dd78383413096066cbea 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2070,13 +2070,14 @@ struct page *alloc_huge_page_vma(struct hstate *h, struct vm_area_struct *vma, * Increase the hugetlb pool such that it can accommodate a reservation * of size 'delta'. */ -static int gather_surplus_pages(struct hstate *h, int delta) +static int gather_surplus_pages(struct hstate *h, long delta) __must_hold(&hugetlb_lock) { struct list_head surplus_list; struct page *page, *tmp; - int ret, i; - int needed, allocated; + int ret; + long i; + long needed, allocated; bool alloc_ok = true; lockdep_assert_held(&hugetlb_lock);