From: Andrew Morton In file included from include/asm/semaphore.h:16, from include/linux/sched.h:58, from arch/powerpc/kernel/asm-offsets.c:18: include/linux/rwsem.h: In function `down_write_nested': include/linux/rwsem.h:98: warning: implicit declaration of function `__down_write_nested' Cc: Ingo Molnar Cc: Arjan van de Ven Signed-off-by: Andrew Morton --- include/linux/rwsem.h | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletion(-) diff -puN include/linux/rwsem.h~lock-validator-prove-rwsem-locking-correctness-powerpc-fix include/linux/rwsem.h --- 25/include/linux/rwsem.h~lock-validator-prove-rwsem-locking-correctness-powerpc-fix 2006-05-30 05:39:16.000000000 -0600 +++ 25-akpm/include/linux/rwsem.h 2006-05-30 05:40:09.000000000 -0600 @@ -89,6 +89,7 @@ static inline void down_write(struct rw_ /* * lock for writing */ +#ifdef CONFIG_PROVE_RWSEM_LOCKING static inline void down_write_nested(struct rw_semaphore *sem, int subtype) { might_sleep(); @@ -98,7 +99,12 @@ static inline void down_write_nested(str __down_write_nested(sem, subtype); rwsemtrace(sem,"Leaving down_write_nested"); } - +#else +static inline void down_write_nested(struct rw_semaphore *sem, int subtype) +{ + down_write(sem); +} +#endif /* * trylock for writing -- returns 1 if successful, 0 if contention _