From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752774AbbJQMPf (ORCPT ); Sat, 17 Oct 2015 08:15:35 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:60580 "EHLO e23smtp04.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752046AbbJQMPe (ORCPT ); Sat, 17 Oct 2015 08:15:34 -0400 X-Helo: d23dlp01.au.ibm.com X-MailFrom: aneesh.kumar@linux.vnet.ibm.com X-RcptTo: linux-kernel@vger.kernel.org From: "Aneesh Kumar K.V" To: Laurent Dufour , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, xemul@parallels.com, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org Cc: criu@openvz.org Subject: Re: [PATCH 2/3] mm: clear_soft_dirty_pmd requires THP In-Reply-To: References: User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Sat, 17 Oct 2015 17:44:33 +0530 Message-ID: <87d1wditee.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15101712-0013-0000-0000-0000020A09BC Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Laurent Dufour writes: > Don't build clear_soft_dirty_pmd() if the transparent huge pages are > not enabled. > > Signed-off-by: Laurent Dufour > CC: Aneesh Kumar K.V Reviewed-by: Aneesh Kumar K.V > --- > fs/proc/task_mmu.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c > index c9454ee39b28..fa847a982a9f 100644 > --- a/fs/proc/task_mmu.c > +++ b/fs/proc/task_mmu.c > @@ -762,7 +762,14 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma, > set_pte_at(vma->vm_mm, addr, pte, ptent); > } > } > +#else > +static inline void clear_soft_dirty(struct vm_area_struct *vma, > + unsigned long addr, pte_t *pte) > +{ > +} > +#endif > > +#if defined(CONFIG_MEM_SOFT_DIRTY) && defined(CONFIG_TRANSPARENT_HUGEPAGE) > static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, > unsigned long addr, pmd_t *pmdp) > { > @@ -776,14 +783,7 @@ static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, > > set_pmd_at(vma->vm_mm, addr, pmdp, pmd); > } > - > #else > - > -static inline void clear_soft_dirty(struct vm_area_struct *vma, > - unsigned long addr, pte_t *pte) > -{ > -} > - > static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, > unsigned long addr, pmd_t *pmdp) > { > -- > 1.9.1