Re: [PATCH V2 4/4] mm/vma: Replace all remaining open encodings with vma_is_anonymous()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/24/20 6:03 AM, Anshuman Khandual wrote:
> This replaces all remaining open encodings with vma_is_anonymous().
> 
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: linux-mm@xxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Signed-off-by: Anshuman Khandual <anshuman.khandual@xxxxxxx>

Acked-by: Vlastimil Babka <vbabka@xxxxxxx

> ---
>  mm/gup.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/gup.c b/mm/gup.c
> index c8ffe2e61f03..58c8cbfeded6 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -146,7 +146,8 @@ static struct page *no_page_table(struct vm_area_struct *vma,
>  	 * But we can only make this optimization where a hole would surely
>  	 * be zero-filled if handle_mm_fault() actually did handle it.
>  	 */
> -	if ((flags & FOLL_DUMP) && (!vma->vm_ops || !vma->vm_ops->fault))
> +	if ((flags & FOLL_DUMP) &&
> +			(vma_is_anonymous(vma) || !vma->vm_ops->fault))
>  		return ERR_PTR(-EFAULT);
>  	return NULL;
>  }
> 





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux