summaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorNicholas Krause <xerofoify@gmail.com>2015-09-04 15:47:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-04 16:54:41 -0700
commit31aafb45f4e1c34e4aba37c150ae4e74880b46ed (patch)
treeed2e7c2305db5cbded30d2ae24702bc7a1c3d3d6 /mm/hugetlb.c
parent1027e4436b6a5c413c95d95e50d0f26348a602ac (diff)
downloadop-kernel-dev-31aafb45f4e1c34e4aba37c150ae4e74880b46ed.zip
op-kernel-dev-31aafb45f4e1c34e4aba37c150ae4e74880b46ed.tar.gz
mm/hugetlb.c: make vma_shareable() return bool
This makes vma_shareable() return bool now due to this particular function only ever returning either one or zero as its return value. Signed-off-by: Nicholas Krause <xerofoify@gmail.com> Acked-by: Mike Kravetz <mike.kravetz@oracle.com> Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index a8c3087..5d1d84c 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3779,7 +3779,7 @@ static unsigned long page_table_shareable(struct vm_area_struct *svma,
return saddr;
}
-static int vma_shareable(struct vm_area_struct *vma, unsigned long addr)
+static bool vma_shareable(struct vm_area_struct *vma, unsigned long addr)
{
unsigned long base = addr & PUD_MASK;
unsigned long end = base + PUD_SIZE;
@@ -3789,8 +3789,8 @@ static int vma_shareable(struct vm_area_struct *vma, unsigned long addr)
*/
if (vma->vm_flags & VM_MAYSHARE &&
vma->vm_start <= base && end <= vma->vm_end)
- return 1;
- return 0;
+ return true;
+ return false;
}
/*
OpenPOWER on IntegriCloud