summaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorNicholas Krause <xerofoify@gmail.com>2015-09-05 00:47:58 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-05 01:54:41 +0200
commit31aafb45f4e1c34e4aba37c150ae4e74880b46ed (patch)
treeed2e7c2305db5cbded30d2ae24702bc7a1c3d3d6 /mm/hugetlb.c
parentmm: make GUP handle pfn mapping unless FOLL_GET is requested (diff)
downloadlinux-31aafb45f4e1c34e4aba37c150ae4e74880b46ed.tar.xz
linux-31aafb45f4e1c34e4aba37c150ae4e74880b46ed.zip
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 a8c3087089d8..5d1d84ca9674 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;
}
/*