Message ID | 1453672883-2708-43-git-send-email-luis.henriques@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index f3111955b701..b247049b534a 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1398,7 +1398,10 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma, page = alloc_buddy_huge_page(h, NUMA_NO_NODE); if (!page) goto out_uncharge_cgroup; - + if (!avoid_reserve && vma_has_reserves(vma, chg)) { + SetPagePrivate(page); + h->resv_huge_pages--; + } spin_lock(&hugetlb_lock); list_move(&page->lru, &h->hugepage_activelist); /* Fall through */