summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorTim Schumacher <[email protected]>2018-10-01 19:42:05 +0200
committerBrian Behlendorf <[email protected]>2018-10-01 10:42:05 -0700
commit424fd7c3e080255935646d2beaa2655c116cc37a (patch)
tree16618fd0366f3c6431bfdb8b531a96764535ee54 /cmd
parentfc23d59fa09f3cd803438986ba70ffcb32b8a036 (diff)
Prefix all refcount functions with zfs_
Recent changes in the Linux kernel made it necessary to prefix the refcount_add() function with zfs_ due to a name collision. To bring the other functions in line with that and to avoid future collisions, prefix the other refcount functions as well. Reviewed by: Matthew Ahrens <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tim Schumacher <[email protected]> Closes #7963
Diffstat (limited to 'cmd')
-rw-r--r--cmd/ztest/ztest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index f4dc0d1b1..f4e121d7e 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -1340,7 +1340,7 @@ ztest_znode_init(uint64_t object)
ztest_znode_t *zp = umem_alloc(sizeof (*zp), UMEM_NOFAIL);
list_link_init(&zp->z_lnode);
- refcount_create(&zp->z_refcnt);
+ zfs_refcount_create(&zp->z_refcnt);
zp->z_object = object;
zfs_rlock_init(&zp->z_range_lock);
@@ -1350,10 +1350,10 @@ ztest_znode_init(uint64_t object)
static void
ztest_znode_fini(ztest_znode_t *zp)
{
- ASSERT(refcount_is_zero(&zp->z_refcnt));
+ ASSERT(zfs_refcount_is_zero(&zp->z_refcnt));
zfs_rlock_destroy(&zp->z_range_lock);
zp->z_object = 0;
- refcount_destroy(&zp->z_refcnt);
+ zfs_refcount_destroy(&zp->z_refcnt);
list_link_init(&zp->z_lnode);
umem_free(zp, sizeof (*zp));
}
@@ -1403,8 +1403,8 @@ ztest_znode_put(ztest_ds_t *zd, ztest_znode_t *zp)
ASSERT3U(zp->z_object, !=, 0);
zll = &zd->zd_range_lock[zp->z_object & (ZTEST_OBJECT_LOCKS - 1)];
mutex_enter(&zll->z_lock);
- refcount_remove(&zp->z_refcnt, RL_TAG);
- if (refcount_is_zero(&zp->z_refcnt)) {
+ zfs_refcount_remove(&zp->z_refcnt, RL_TAG);
+ if (zfs_refcount_is_zero(&zp->z_refcnt)) {
list_remove(&zll->z_list, zp);
ztest_znode_fini(zp);
}