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:
parent
4d54fdee1d
commit
0e77fc118e
|
@ -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); \
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue