diff options
author | Brian Behlendorf <[email protected]> | 2018-07-30 09:22:30 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2018-07-30 09:22:30 -0700 |
commit | 11d0525cbb15a3519df683ec0248b6ac55f9d090 (patch) | |
tree | 14fdc0c33c8972cdf79644c5306716ec4d95cb03 /include | |
parent | fb7307b8922e9eb7da430733d6665e06d2cb0bf5 (diff) |
Add rwsem_tryupgrade for 4.9.20-rt16 kernel
The RT rwsem implementation was changed to allow multiple readers
as of the 4.9.20-rt16 patch set. This results in a build failure
because the existing implementation was forced to directly access
the rwsem structure which has changed.
While this could be accommodated by adding additional compatibility
code. This patch resolves the build issue by simply assuming the
rwsem can never be upgraded. This functionality is a performance
optimization and all callers must already handle this case.
Converting the last remaining use of __SPIN_LOCK_UNLOCKED to
spin_lock_init() was additionally required to get a clean build.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #7589
Diffstat (limited to 'include')
-rw-r--r-- | include/spl/sys/rwlock.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/spl/sys/rwlock.h b/include/spl/sys/rwlock.h index 088e28b44..0ac528e16 100644 --- a/include/spl/sys/rwlock.h +++ b/include/spl/sys/rwlock.h @@ -172,7 +172,7 @@ RW_LOCK_HELD(krwlock_t *rwp) } /* - * The following functions must be a #define and not static inline. + * The following functions must be a #define and not static inline. * This ensures that the native linux semaphore functions (down/up) * will be correctly located in the users code which is important * for the built in kernel lock analysis tools @@ -188,10 +188,10 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_set_type(rwp, type); \ }) -#define rw_destroy(rwp) \ -({ \ - VERIFY(!RW_LOCK_HELD(rwp)); \ -}) +/* + * The Linux rwsem implementation does not require a matching destroy. + */ +#define rw_destroy(rwp) ((void) 0) #define rw_tryenter(rwp, rw) \ ({ \ |