Expand SEM() outside init_rwsem and directly call __init_rwsem().

We need to directly call __init_rwsem() or the name gets expanded
to SEM(lock-name).  This is safe and correct for the support arches
x86/x86_64/ppc/ppc64.
This commit is contained in:
Brian Behlendorf 2009-09-29 03:19:09 -07:00
parent 4d54fdee1d
commit 0e77fc118e
1 changed files with 3 additions and 1 deletions

View File

@ -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); \
})