aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 3e1506b808a3..8c20aed62b9c 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -342,13 +342,13 @@ void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
342} 342}
343 343
344/* Returns true if the VMA has associated reserve pages */ 344/* Returns true if the VMA has associated reserve pages */
345static int vma_has_private_reserves(struct vm_area_struct *vma) 345static int vma_has_reserves(struct vm_area_struct *vma)
346{ 346{
347 if (vma->vm_flags & VM_SHARED) 347 if (vma->vm_flags & VM_SHARED)
348 return 0; 348 return 1;
349 if (!is_vma_resv_set(vma, HPAGE_RESV_OWNER)) 349 if (is_vma_resv_set(vma, HPAGE_RESV_OWNER))
350 return 0; 350 return 1;
351 return 1; 351 return 0;
352} 352}
353 353
354static void clear_huge_page(struct page *page, 354static void clear_huge_page(struct page *page,
@@ -420,7 +420,7 @@ static struct page *dequeue_huge_page_vma(struct hstate *h,
420 * have no page reserves. This check ensures that reservations are 420 * have no page reserves. This check ensures that reservations are
421 * not "stolen". The child may still get SIGKILLed 421 * not "stolen". The child may still get SIGKILLed
422 */ 422 */
423 if (!vma_has_private_reserves(vma) && 423 if (!vma_has_reserves(vma) &&
424 h->free_huge_pages - h->resv_huge_pages == 0) 424 h->free_huge_pages - h->resv_huge_pages == 0)
425 return NULL; 425 return NULL;
426 426