diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-05-24 20:12:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 11:39:19 -0400 |
commit | 2b575eb64f7a9c701fb4bfdb12388ac547f6c2b6 (patch) | |
tree | 965739cbf570567a26f1512ae9a9fe35ce1afbed /include/linux/huge_mm.h | |
parent | 746b18d421da7f27e948e8af1ad82b6d0309324d (diff) |
mm: convert anon_vma->lock to a mutex
Straightforward conversion of anon_vma->lock to a mutex.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Miller <davem@davemloft.net>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Tony Luck <tony.luck@intel.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/huge_mm.h')
-rw-r--r-- | include/linux/huge_mm.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h index 8847c8c29791..48c32ebf65a7 100644 --- a/include/linux/huge_mm.h +++ b/include/linux/huge_mm.h | |||
@@ -92,12 +92,8 @@ extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd); | |||
92 | #define wait_split_huge_page(__anon_vma, __pmd) \ | 92 | #define wait_split_huge_page(__anon_vma, __pmd) \ |
93 | do { \ | 93 | do { \ |
94 | pmd_t *____pmd = (__pmd); \ | 94 | pmd_t *____pmd = (__pmd); \ |
95 | spin_unlock_wait(&(__anon_vma)->root->lock); \ | 95 | anon_vma_lock(__anon_vma); \ |
96 | /* \ | 96 | anon_vma_unlock(__anon_vma); \ |
97 | * spin_unlock_wait() is just a loop in C and so the \ | ||
98 | * CPU can reorder anything around it. \ | ||
99 | */ \ | ||
100 | smp_mb(); \ | ||
101 | BUG_ON(pmd_trans_splitting(*____pmd) || \ | 97 | BUG_ON(pmd_trans_splitting(*____pmd) || \ |
102 | pmd_trans_huge(*____pmd)); \ | 98 | pmd_trans_huge(*____pmd)); \ |
103 | } while (0) | 99 | } while (0) |