aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rmap.h
diff options
context:
space:
mode:
authorRik van Riel <riel@redhat.com>2010-08-09 20:18:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-09 23:44:55 -0400
commitcba48b98f2348c814316c4b4f411a07a0e4a2bf9 (patch)
tree49c0426f8d41cb147722305c2c3495dd515c3253 /include/linux/rmap.h
parentbb4a340e075b7897ece109686bfa177f8518d2db (diff)
mm: change direct call of spin_lock(anon_vma->lock) to inline function
Subsitute a direct call of spin_lock(anon_vma->lock) with an inline function doing exactly the same. This makes it easier to do the substitution to the root anon_vma lock in a following patch. We will deal with the handful of special locks (nested, dec_and_lock, etc) separately. Signed-off-by: Rik van Riel <riel@redhat.com> Acked-by: Mel Gorman <mel@csn.ul.ie> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Tested-by: Larry Woodman <lwoodman@redhat.com> Acked-by: Larry Woodman <lwoodman@redhat.com> Reviewed-by: Minchan Kim <minchan.kim@gmail.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/rmap.h')
-rw-r--r--include/linux/rmap.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/rmap.h b/include/linux/rmap.h
index 80cd162a8aa6..5f981be61416 100644
--- a/include/linux/rmap.h
+++ b/include/linux/rmap.h
@@ -113,6 +113,16 @@ static inline void vma_unlock_anon_vma(struct vm_area_struct *vma)
113 spin_unlock(&anon_vma->lock); 113 spin_unlock(&anon_vma->lock);
114} 114}
115 115
116static inline void anon_vma_lock(struct anon_vma *anon_vma)
117{
118 spin_lock(&anon_vma->lock);
119}
120
121static inline void anon_vma_unlock(struct anon_vma *anon_vma)
122{
123 spin_unlock(&anon_vma->lock);
124}
125
116/* 126/*
117 * anon_vma helper functions. 127 * anon_vma helper functions.
118 */ 128 */