@@ -47,7 +47,7 @@ _raw_write_unlock_irqrestore(rwlock_t *lock, unsigned long flags)
#ifdef CONFIG_INLINE_WRITE_LOCK
#define _raw_write_lock(lock) __raw_write_lock(lock)
-#define _raw_write_lock_nested(lock, subclass) __raw_write_lock_nested(lock, subclass)
+#define _raw_write_lock_nested(lock) __raw_write_lock(lock)
#endif
#ifdef CONFIG_INLINE_READ_LOCK_BH
@@ -301,6 +301,10 @@ void __lockfunc _raw_write_lock(rwlock_t *lock)
}
EXPORT_SYMBOL(_raw_write_lock);
+#ifndef CONFIG_DEBUG_LOCK_ALLOC
+#define __raw_write_lock_nested(lock, subclass) __raw_write_lock(((void)(subclass), (lock)))
+#endif
+
void __lockfunc _raw_write_lock_nested(rwlock_t *lock, int subclass)
{
__raw_write_lock_nested(lock, subclass);
Andrew, please merge it into: locking/rwlocks: introduce write_lock_nested locking-rwlocks-introduce-write_lock_nested.patch And if someone could test it, I get sh4 defconfig built with and without lockdep. x86 seems still to build, too. So it can't be that bad. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- include/linux/rwlock_api_smp.h | 2 +- kernel/locking/spinlock.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-)