]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm/hugetlb.c: make vma_has_reserves() return bool
authorNicholas Krause <xerofoify@gmail.com>
Mon, 17 Aug 2015 23:49:19 +0000 (09:49 +1000)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Thu, 27 Aug 2015 23:02:54 +0000 (16:02 -0700)
Orabug: 21652814

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: Nicholas Krause <xerofoify@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit f7bba6ea9b80a19c4849b4d870fb2f2bd492713b)
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
mm/hugetlb.c

index 7dafdc15873e6ca45ce00cc9c1caa99bfa1db952..aafb704cb69029827705a81ffcff7e3355374a08 100644 (file)
@@ -777,7 +777,7 @@ void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
 }
 
 /* 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) {
                /*
@@ -790,23 +790,23 @@ static int vma_has_reserves(struct vm_area_struct *vma, long chg)
                 * properly, so add work-around here.
                 */
                if (vma->vm_flags & VM_MAYSHARE && chg == 0)
-                       return 1;
+                       return true;
                else
-                       return 0;
+                       return false;
        }
 
        /* Shared mappings always use reserves */
        if (vma->vm_flags & VM_MAYSHARE)
-               return 1;
+               return true;
 
        /*
         * Only the process that called mmap() has reserves for
         * private mappings.
         */
        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)