mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add some missing rw_lock symbols
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@27 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
+28
-25
@@ -1,7 +1,33 @@
|
||||
#include <sys/rwlock.h>
|
||||
|
||||
int
|
||||
rw_lock_held(krwlock_t *rwlp)
|
||||
__rw_read_held(krwlock_t *rwlp)
|
||||
{
|
||||
BUG_ON(rwlp->rw_magic != RW_MAGIC);
|
||||
|
||||
if (__rw_lock_held(rwlp) && rwlp->rw_owner == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(__rw_read_held);
|
||||
|
||||
int
|
||||
__rw_write_held(krwlock_t *rwlp)
|
||||
{
|
||||
BUG_ON(rwlp->rw_magic != RW_MAGIC);
|
||||
|
||||
if (rwlp->rw_owner == current) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(__rw_write_held);
|
||||
|
||||
int
|
||||
__rw_lock_held(krwlock_t *rwlp)
|
||||
{
|
||||
BUG_ON(rwlp->rw_magic != RW_MAGIC);
|
||||
|
||||
@@ -15,27 +41,4 @@ rw_lock_held(krwlock_t *rwlp)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
rw_read_held(krwlock_t *rwlp)
|
||||
{
|
||||
BUG_ON(rwlp->rw_magic != RW_MAGIC);
|
||||
|
||||
if (rw_lock_held(rwlp) && rwlp->rw_owner == NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
rw_write_held(krwlock_t *rwlp)
|
||||
{
|
||||
BUG_ON(rwlp->rw_magic != RW_MAGIC);
|
||||
|
||||
if (rwlp->rw_owner == current) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(__rw_lock_held);
|
||||
|
||||
Reference in New Issue
Block a user