summaryrefslogtreecommitdiffstats
path: root/module/zfs/refcount.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/refcount.c')
-rw-r--r--module/zfs/refcount.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/module/zfs/refcount.c b/module/zfs/refcount.c
index 13f9bb6b7..0a93aafb1 100644
--- a/module/zfs/refcount.c
+++ b/module/zfs/refcount.c
@@ -38,7 +38,7 @@ static kmem_cache_t *reference_cache;
static kmem_cache_t *reference_history_cache;
void
-refcount_init(void)
+zfs_refcount_init(void)
{
reference_cache = kmem_cache_create("reference_cache",
sizeof (reference_t), 0, NULL, NULL, NULL, NULL, NULL, 0);
@@ -48,14 +48,14 @@ refcount_init(void)
}
void
-refcount_fini(void)
+zfs_refcount_fini(void)
{
kmem_cache_destroy(reference_cache);
kmem_cache_destroy(reference_history_cache);
}
void
-refcount_create(zfs_refcount_t *rc)
+zfs_refcount_create(zfs_refcount_t *rc)
{
mutex_init(&rc->rc_mtx, NULL, MUTEX_DEFAULT, NULL);
list_create(&rc->rc_list, sizeof (reference_t),
@@ -68,21 +68,21 @@ refcount_create(zfs_refcount_t *rc)
}
void
-refcount_create_tracked(zfs_refcount_t *rc)
+zfs_refcount_create_tracked(zfs_refcount_t *rc)
{
- refcount_create(rc);
+ zfs_refcount_create(rc);
rc->rc_tracked = B_TRUE;
}
void
-refcount_create_untracked(zfs_refcount_t *rc)
+zfs_refcount_create_untracked(zfs_refcount_t *rc)
{
- refcount_create(rc);
+ zfs_refcount_create(rc);
rc->rc_tracked = B_FALSE;
}
void
-refcount_destroy_many(zfs_refcount_t *rc, uint64_t number)
+zfs_refcount_destroy_many(zfs_refcount_t *rc, uint64_t number)
{
reference_t *ref;
@@ -103,25 +103,25 @@ refcount_destroy_many(zfs_refcount_t *rc, uint64_t number)
}
void
-refcount_destroy(zfs_refcount_t *rc)
+zfs_refcount_destroy(zfs_refcount_t *rc)
{
- refcount_destroy_many(rc, 0);
+ zfs_refcount_destroy_many(rc, 0);
}
int
-refcount_is_zero(zfs_refcount_t *rc)
+zfs_refcount_is_zero(zfs_refcount_t *rc)
{
return (rc->rc_count == 0);
}
int64_t
-refcount_count(zfs_refcount_t *rc)
+zfs_refcount_count(zfs_refcount_t *rc)
{
return (rc->rc_count);
}
int64_t
-refcount_add_many(zfs_refcount_t *rc, uint64_t number, void *holder)
+zfs_refcount_add_many(zfs_refcount_t *rc, uint64_t number, void *holder)
{
reference_t *ref = NULL;
int64_t count;
@@ -145,11 +145,11 @@ refcount_add_many(zfs_refcount_t *rc, uint64_t number, void *holder)
int64_t
zfs_refcount_add(zfs_refcount_t *rc, void *holder)
{
- return (refcount_add_many(rc, 1, holder));
+ return (zfs_refcount_add_many(rc, 1, holder));
}
int64_t
-refcount_remove_many(zfs_refcount_t *rc, uint64_t number, void *holder)
+zfs_refcount_remove_many(zfs_refcount_t *rc, uint64_t number, void *holder)
{
reference_t *ref;
int64_t count;
@@ -197,13 +197,13 @@ refcount_remove_many(zfs_refcount_t *rc, uint64_t number, void *holder)
}
int64_t
-refcount_remove(zfs_refcount_t *rc, void *holder)
+zfs_refcount_remove(zfs_refcount_t *rc, void *holder)
{
- return (refcount_remove_many(rc, 1, holder));
+ return (zfs_refcount_remove_many(rc, 1, holder));
}
void
-refcount_transfer(zfs_refcount_t *dst, zfs_refcount_t *src)
+zfs_refcount_transfer(zfs_refcount_t *dst, zfs_refcount_t *src)
{
int64_t count, removed_count;
list_t list, removed;
@@ -234,7 +234,7 @@ refcount_transfer(zfs_refcount_t *dst, zfs_refcount_t *src)
}
void
-refcount_transfer_ownership(zfs_refcount_t *rc, void *current_holder,
+zfs_refcount_transfer_ownership(zfs_refcount_t *rc, void *current_holder,
void *new_holder)
{
reference_t *ref;
@@ -264,7 +264,7 @@ refcount_transfer_ownership(zfs_refcount_t *rc, void *current_holder,
* might be held.
*/
boolean_t
-refcount_held(zfs_refcount_t *rc, void *holder)
+zfs_refcount_held(zfs_refcount_t *rc, void *holder)
{
reference_t *ref;
@@ -292,7 +292,7 @@ refcount_held(zfs_refcount_t *rc, void *holder)
* since the reference might not be held.
*/
boolean_t
-refcount_not_held(zfs_refcount_t *rc, void *holder)
+zfs_refcount_not_held(zfs_refcount_t *rc, void *holder)
{
reference_t *ref;