Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
@@ -401,11 +401,11 @@
mutex_exit(&smbfreelist_lock);
np = kmem_cache_alloc(smbnode_cache, KM_SLEEP);
new_vp = vn_alloc(KM_SLEEP);
- atomic_add_long((ulong_t *)&smbnodenew, 1);
+ atomic_inc_ulong((ulong_t *)&smbnodenew);
vp = new_vp;
}
/*
* Allocate and copy the rpath we'll need below.
@@ -1025,11 +1025,11 @@
ASSERT(np->r_secattr.vsa_aclentp == NULL);
ASSERT(np->r_cred == NULL);
ASSERT(np->n_rpath == NULL);
ASSERT(!(np->r_flags & RHASHED));
ASSERT(np->r_freef == NULL && np->r_freeb == NULL);
- atomic_add_long((ulong_t *)&smbnodenew, -1);
+ atomic_dec_ulong((ulong_t *)&smbnodenew);
vn_invalid(vp);
vn_free(vp);
kmem_cache_free(smbnode_cache, np);
VFS_RELE(vfsp);
}