aboutsummaryrefslogtreecommitdiffstats
path: root/modules/spl/spl-rwlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/spl/spl-rwlock.c')
-rw-r--r--modules/spl/spl-rwlock.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/modules/spl/spl-rwlock.c b/modules/spl/spl-rwlock.c
index d74d89e24..fa78d4c14 100644
--- a/modules/spl/spl-rwlock.c
+++ b/modules/spl/spl-rwlock.c
@@ -1,41 +1,44 @@
#include <sys/rwlock.h>
int
-rw_lock_held(krwlock_t *rwlp)
+__rw_read_held(krwlock_t *rwlp)
{
BUG_ON(rwlp->rw_magic != RW_MAGIC);
-#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
- if (rwlp->rw_sem.activity != 0) {
-#else
- if (rwlp->rw_sem.count != 0) {
-#endif
+ if (__rw_lock_held(rwlp) && rwlp->rw_owner == NULL) {
return 1;
}
return 0;
}
+EXPORT_SYMBOL(__rw_read_held);
int
-rw_read_held(krwlock_t *rwlp)
+__rw_write_held(krwlock_t *rwlp)
{
BUG_ON(rwlp->rw_magic != RW_MAGIC);
- if (rw_lock_held(rwlp) && rwlp->rw_owner == NULL) {
+ if (rwlp->rw_owner == current) {
return 1;
}
return 0;
}
+EXPORT_SYMBOL(__rw_write_held);
int
-rw_write_held(krwlock_t *rwlp)
+__rw_lock_held(krwlock_t *rwlp)
{
BUG_ON(rwlp->rw_magic != RW_MAGIC);
- if (rwlp->rw_owner == current) {
+#ifdef CONFIG_RWSEM_GENERIC_SPINLOCK
+ if (rwlp->rw_sem.activity != 0) {
+#else
+ if (rwlp->rw_sem.count != 0) {
+#endif
return 1;
}
return 0;
}
+EXPORT_SYMBOL(__rw_lock_held);