Retire rwsem_is_locked() compat

Stock Linux 2.6.32 and earlier kernels contained a broken version of
rwsem_is_locked() which could return an incorrect value.  Because of
this compatibility code was added to detect the broken implementation
and replace it with our own if needed.

The fix for this issue was merged in to the mainline Linux kernel as
of 2.6.33 and the major enterprise distributions based on 2.6.32 have
all backported the fix.  Therefore there is no longer a need to carry
this code and it can be removed.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #454
This commit is contained in:
Brian Behlendorf
2015-06-03 10:42:36 -07:00
parent a876b0305e
commit 86c16c59fe
3 changed files with 2 additions and 50 deletions
+2 -4
View File
@@ -83,15 +83,13 @@ rw_owner(krwlock_t *rwp)
static inline int
RW_READ_HELD(krwlock_t *rwp)
{
return (spl_rwsem_is_locked(SEM(rwp)) &&
rw_owner(rwp) == NULL);
return (spl_rwsem_is_locked(SEM(rwp)) && rw_owner(rwp) == NULL);
}
static inline int
RW_WRITE_HELD(krwlock_t *rwp)
{
return (spl_rwsem_is_locked(SEM(rwp)) &&
rw_owner(rwp) == current);
return (spl_rwsem_is_locked(SEM(rwp)) && rw_owner(rwp) == current);
}
static inline int