From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753082AbcEWU1y (ORCPT ); Mon, 23 May 2016 16:27:54 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:20167 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbcEWU1x convert rfc822-to-8bit (ORCPT ); Mon, 23 May 2016 16:27:53 -0400 Subject: Re: [PATCH] xen/privcmd: use vma_pages(). To: Muhammad Falak R Wani References: <1463836161-16524-1-git-send-email-falakreyaz@gmail.com> Cc: David Vrabel , Juergen Gross , "moderated list:XEN HYPERVISOR INTERFACE" , open list From: Boris Ostrovsky Message-ID: <5743677D.7030603@oracle.com> Date: Mon, 23 May 2016 16:26:37 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1463836161-16524-1-git-send-email-falakreyaz@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8BIT X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/21/2016 09:09 AM, Muhammad Falak R Wani wrote: > Replace explicit computation of vma page count by a call to > vma_pages() > > Signed-off-by: Muhammad Falak R Wani > --- > drivers/xen/privcmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c > index df2e6f7..702040f 100644 > --- a/drivers/xen/privcmd.c > +++ b/drivers/xen/privcmd.c > @@ -582,7 +582,7 @@ static long privcmd_ioctl(struct file *file, > static void privcmd_close(struct vm_area_struct *vma) > { > struct page **pages = vma->vm_private_data; > - int numpgs = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; > + int numpgs = vma_pages(vma); > int numgfns = (vma->vm_end - vma->vm_start) >> XEN_PAGE_SHIFT; > int rc; > Can you combine all three patches into a single one? Thanks. -boris