From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: [PATCH 03/28] rename anon_vma_lock to vma_lock_anon_vma Date: Mon, 07 Jun 2010 13:06:57 +0200 Message-ID: <20100607111406.662536918@chello.nl> References: <20100607110654.606530953@chello.nl> Return-path: Received: from casper.infradead.org ([85.118.1.10]:41223 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440Ab0FGLUG (ORCPT ); Mon, 7 Jun 2010 07:20:06 -0400 Content-Disposition: inline; filename=riel-01-mm-rename_anon_vma_lock_to_vma_lock_anon_vma.patch Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andrea Arcangeli , Avi Kivity , Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-fou Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Peter Zijlstra , "Paul E. McKenney" , KAMEZAWA Hiroyuki From: Rik van Riel Rename anon_vma_lock to vma_lock_anon_vma. This matches the naming style used in page_lock_anon_vma and will come in really handy further down in this patch series. Signed-off-by: Rik van Riel Acked-by: Mel Gorman Acked-by: KAMEZAWA Hiroyuki Signed-off-by: Peter Zijlstra LKML-Reference: <20100526153853.55b72183@annuminas.surriel.com> --- include/linux/rmap.h | 4 ++-- mm/mmap.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) Index: linux-2.6/include/linux/rmap.h =================================================================== --- linux-2.6.orig/include/linux/rmap.h +++ linux-2.6/include/linux/rmap.h @@ -99,14 +99,14 @@ static inline struct anon_vma *page_anon return page_rmapping(page); } -static inline void anon_vma_lock(struct vm_area_struct *vma) +static inline void vma_lock_anon_vma(struct vm_area_struct *vma) { struct anon_vma *anon_vma = vma->anon_vma; if (anon_vma) spin_lock(&anon_vma->lock); } -static inline void anon_vma_unlock(struct vm_area_struct *vma) +static inline void vma_unlock_anon_vma(struct vm_area_struct *vma) { struct anon_vma *anon_vma = vma->anon_vma; if (anon_vma) Index: linux-2.6/mm/mmap.c =================================================================== --- linux-2.6.orig/mm/mmap.c +++ linux-2.6/mm/mmap.c @@ -452,12 +452,12 @@ static void vma_link(struct mm_struct *m spin_lock(&mapping->i_mmap_lock); vma->vm_truncate_count = mapping->truncate_count; } - anon_vma_lock(vma); + vma_lock_anon_vma(vma); __vma_link(mm, vma, prev, rb_link, rb_parent); __vma_link_file(vma); - anon_vma_unlock(vma); + vma_unlock_anon_vma(vma); if (mapping) spin_unlock(&mapping->i_mmap_lock); @@ -1710,7 +1710,7 @@ int expand_upwards(struct vm_area_struct */ if (unlikely(anon_vma_prepare(vma))) return -ENOMEM; - anon_vma_lock(vma); + vma_lock_anon_vma(vma); /* * vma->vm_start/vm_end cannot change under us because the caller @@ -1721,7 +1721,7 @@ int expand_upwards(struct vm_area_struct if (address < PAGE_ALIGN(address+4)) address = PAGE_ALIGN(address+4); else { - anon_vma_unlock(vma); + vma_unlock_anon_vma(vma); return -ENOMEM; } error = 0; @@ -1737,7 +1737,7 @@ int expand_upwards(struct vm_area_struct if (!error) vma->vm_end = address; } - anon_vma_unlock(vma); + vma_unlock_anon_vma(vma); return error; } #endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */ @@ -1762,7 +1762,7 @@ static int expand_downwards(struct vm_ar if (error) return error; - anon_vma_lock(vma); + vma_lock_anon_vma(vma); /* * vma->vm_start/vm_end cannot change under us because the caller From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from casper.infradead.org ([85.118.1.10]:41223 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440Ab0FGLUG (ORCPT ); Mon, 7 Jun 2010 07:20:06 -0400 Message-ID: <20100607111406.662536918@chello.nl> Date: Mon, 07 Jun 2010 13:06:57 +0200 From: Peter Zijlstra Subject: [PATCH 03/28] rename anon_vma_lock to vma_lock_anon_vma References: <20100607110654.606530953@chello.nl> Content-Disposition: inline; filename=riel-01-mm-rename_anon_vma_lock_to_vma_lock_anon_vma.patch Sender: linux-arch-owner@vger.kernel.org List-ID: To: Andrea Arcangeli , Avi Kivity , Thomas Gleixner , Rik van Riel , Ingo Molnar , akpm@linux-foundation.org, Linus Torvalds Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Benjamin Herrenschmidt , David Miller , Hugh Dickins , Mel Gorman , Nick Piggin , Peter Zijlstra , "Paul E. McKenney" , KAMEZAWA Hiroyuki Message-ID: <20100607110657.VFCmRIviTtPoej3VkSskK_19JfShL1N6EYK51Xgnttc@z> From: Rik van Riel Rename anon_vma_lock to vma_lock_anon_vma. This matches the naming style used in page_lock_anon_vma and will come in really handy further down in this patch series. Signed-off-by: Rik van Riel Acked-by: Mel Gorman Acked-by: KAMEZAWA Hiroyuki Signed-off-by: Peter Zijlstra LKML-Reference: <20100526153853.55b72183@annuminas.surriel.com> --- include/linux/rmap.h | 4 ++-- mm/mmap.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) Index: linux-2.6/include/linux/rmap.h =================================================================== --- linux-2.6.orig/include/linux/rmap.h +++ linux-2.6/include/linux/rmap.h @@ -99,14 +99,14 @@ static inline struct anon_vma *page_anon return page_rmapping(page); } -static inline void anon_vma_lock(struct vm_area_struct *vma) +static inline void vma_lock_anon_vma(struct vm_area_struct *vma) { struct anon_vma *anon_vma = vma->anon_vma; if (anon_vma) spin_lock(&anon_vma->lock); } -static inline void anon_vma_unlock(struct vm_area_struct *vma) +static inline void vma_unlock_anon_vma(struct vm_area_struct *vma) { struct anon_vma *anon_vma = vma->anon_vma; if (anon_vma) Index: linux-2.6/mm/mmap.c =================================================================== --- linux-2.6.orig/mm/mmap.c +++ linux-2.6/mm/mmap.c @@ -452,12 +452,12 @@ static void vma_link(struct mm_struct *m spin_lock(&mapping->i_mmap_lock); vma->vm_truncate_count = mapping->truncate_count; } - anon_vma_lock(vma); + vma_lock_anon_vma(vma); __vma_link(mm, vma, prev, rb_link, rb_parent); __vma_link_file(vma); - anon_vma_unlock(vma); + vma_unlock_anon_vma(vma); if (mapping) spin_unlock(&mapping->i_mmap_lock); @@ -1710,7 +1710,7 @@ int expand_upwards(struct vm_area_struct */ if (unlikely(anon_vma_prepare(vma))) return -ENOMEM; - anon_vma_lock(vma); + vma_lock_anon_vma(vma); /* * vma->vm_start/vm_end cannot change under us because the caller @@ -1721,7 +1721,7 @@ int expand_upwards(struct vm_area_struct if (address < PAGE_ALIGN(address+4)) address = PAGE_ALIGN(address+4); else { - anon_vma_unlock(vma); + vma_unlock_anon_vma(vma); return -ENOMEM; } error = 0; @@ -1737,7 +1737,7 @@ int expand_upwards(struct vm_area_struct if (!error) vma->vm_end = address; } - anon_vma_unlock(vma); + vma_unlock_anon_vma(vma); return error; } #endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */ @@ -1762,7 +1762,7 @@ static int expand_downwards(struct vm_ar if (error) return error; - anon_vma_lock(vma); + vma_lock_anon_vma(vma); /* * vma->vm_start/vm_end cannot change under us because the caller