From: Hugh Dickins <[email-masked]>

p?d_test_and_populate macros ought to use "(__mm)" rather than "mm".

Signed-off-by: Hugh Dickins <[email-masked]>
Cc: Christoph Lameter <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 include/asm-generic/pgtable.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -puN include/asm-generic/pgtable.h~page-fault-patches-optional-page_lock-acquisition-in-nicety include/asm-generic/pgtable.h
--- 25/include/asm-generic/pgtable.h~page-fault-patches-optional-page_lock-acquisition-in-nicety	Mon Aug 29 14:09:58 2005
+++ 25-akpm/include/asm-generic/pgtable.h	Mon Aug 29 14:09:58 2005
@@ -168,10 +168,10 @@ do {				  					  \
 #define pgd_test_and_populate(__mm, __pgd, __pud)			\
 ({									\
 	int __rc;							\
-	spin_lock(&mm->page_table_lock);				\
+	spin_lock(&(__mm)->page_table_lock);				\
 	__rc = pgd_none(*(__pgd));					\
 	if (__rc) pgd_populate(__mm, __pgd, __pud);			\
-	spin_unlock(&mm->page_table_lock);				\
+	spin_unlock(&(__mm)->page_table_lock);				\
 	__rc;								\
 })
 #endif
@@ -180,10 +180,10 @@ do {				  					  \
 #define pud_test_and_populate(__mm, __pud, __pmd)			\
 ({									\
 	int __rc;							\
-	spin_lock(&mm->page_table_lock);				\
+	spin_lock(&(__mm)->page_table_lock);				\
 	__rc = pud_none(*(__pud));					\
 	if (__rc) pud_populate(__mm, __pud, __pmd);			\
-	spin_unlock(&mm->page_table_lock);				\
+	spin_unlock(&(__mm)->page_table_lock);				\
 	__rc;								\
 })
 #endif
@@ -192,10 +192,10 @@ do {				  					  \
 #define pmd_test_and_populate(__mm, __pmd, __page)			\
 ({									\
 	int __rc;							\
-	spin_lock(&mm->page_table_lock);				\
+	spin_lock(&(__mm)->page_table_lock);				\
 	__rc = !pmd_present(*(__pmd));					\
 	if (__rc) pmd_populate(__mm, __pmd, __page);			\
-	spin_unlock(&mm->page_table_lock);				\
+	spin_unlock(&(__mm)->page_table_lock);				\
 	__rc;								\
 })
 #endif
_