Commit 559ec2f8 authored by Nicholas Krause's avatar Nicholas Krause Committed by Linus Torvalds

mm/hugetlb.c: make vma_has_reserves() return bool

This makes vma_has_reserves() return bool due to this particular function
only returning either one or zero as its return value.
Signed-off-by: default avatarNicholas Krause <xerofoify@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1ecef9ed
...@@ -616,7 +616,7 @@ void reset_vma_resv_huge_pages(struct vm_area_struct *vma) ...@@ -616,7 +616,7 @@ void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
} }
/* Returns true if the VMA has associated reserve pages */ /* Returns true if the VMA has associated reserve pages */
static int vma_has_reserves(struct vm_area_struct *vma, long chg) static bool vma_has_reserves(struct vm_area_struct *vma, long chg)
{ {
if (vma->vm_flags & VM_NORESERVE) { if (vma->vm_flags & VM_NORESERVE) {
/* /*
...@@ -629,23 +629,23 @@ static int vma_has_reserves(struct vm_area_struct *vma, long chg) ...@@ -629,23 +629,23 @@ static int vma_has_reserves(struct vm_area_struct *vma, long chg)
* properly, so add work-around here. * properly, so add work-around here.
*/ */
if (vma->vm_flags & VM_MAYSHARE && chg == 0) if (vma->vm_flags & VM_MAYSHARE && chg == 0)
return 1; return true;
else else
return 0; return false;
} }
/* Shared mappings always use reserves */ /* Shared mappings always use reserves */
if (vma->vm_flags & VM_MAYSHARE) if (vma->vm_flags & VM_MAYSHARE)
return 1; return true;
/* /*
* Only the process that called mmap() has reserves for * Only the process that called mmap() has reserves for
* private mappings. * private mappings.
*/ */
if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) if (is_vma_resv_set(vma, HPAGE_RESV_OWNER))
return 1; return true;
return 0; return false;
} }
static void enqueue_huge_page(struct hstate *h, struct page *page) static void enqueue_huge_page(struct hstate *h, struct page *page)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment