summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sys/rwlock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h
index a68d07243..75356b95d 100644
--- a/include/sys/rwlock.h
+++ b/include/sys/rwlock.h
@@ -154,7 +154,9 @@ RW_LOCK_HELD(krwlock_t *rwp)
*/
#define rw_init(rwp, name, type, arg) \
({ \
- init_rwsem(SEM(rwp)); \
+ static struct lock_class_key __key; \
+ \
+ __init_rwsem(SEM(rwp), #rwp, &__key); \
spl_rw_clear_owner(rwp); \
})