mm: wrap follow_pte() using __cond_lock()
authorNamhyung Kim <namhyung@gmail.com>
Tue, 26 Oct 2010 21:22:00 +0000 (14:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Oct 2010 23:52:09 +0000 (16:52 -0700)
commit1b36ba815bd91f17e31277a44dd5c6b6a5a8d97e
tree9d68d66e780c619b01c5d8ddc93e19547b448142
parente6219ec8195efd5640765e657810f262ad9d1a92
mm: wrap follow_pte() using __cond_lock()

The follow_pte() conditionally grabs *@ptlp in case of returning 0.
Rename and wrap it using __cond_lock() removes following warnings:

 mm/memory.c:2337:9: warning: context imbalance in 'do_wp_page' - unexpected unlock
 mm/memory.c:3142:19: warning: context imbalance in 'handle_mm_fault' - different lock contexts for basic block

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c