Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1172585 > unrolled thread

Re: [PATCH] hugetlb:Make the function vma_shareable bool

Started byMike Kravetz <mike.kravetz@oracle.com>
First post2015-06-26 06:20 +0200
Last post2015-06-26 06:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] hugetlb:Make the function vma_shareable bool Mike Kravetz <mike.kravetz@oracle.com> - 2015-06-26 06:20 +0200

#1172585 — Re: [PATCH] hugetlb:Make the function vma_shareable bool

FromMike Kravetz <mike.kravetz@oracle.com>
Date2015-06-26 06:20 +0200
SubjectRe: [PATCH] hugetlb:Make the function vma_shareable bool
Message-ID<pFtho-4DE-5@gated-at.bofh.it>
On 06/25/2015 06:19 PM, Nicholas Krause wrote:
> This makes the function vma_shareable 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>
> ---
>   mm/hugetlb.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
> index 75c0eef..c1be0d1 100644
> --- a/mm/hugetlb.c
> +++ b/mm/hugetlb.c
> @@ -3789,7 +3789,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;
> @@ -3799,8 +3799,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;
>   }
>
>   /*
>

I was looking at the page table sharing code just last week.

Acked-by: Mike Kravetz <mike.kravetz@oracle.com>
-- 
Mike Kravetz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web