Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/contrib/opensolaris/uts/common/fs/vnode.c
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
* Warning: Excessive use of this routine can lead to performance problems. | * Warning: Excessive use of this routine can lead to performance problems. | ||||
* This is because taskqs throttle back allocation if too many are created. | * This is because taskqs throttle back allocation if too many are created. | ||||
*/ | */ | ||||
void | void | ||||
vn_rele_async(vnode_t *vp, taskq_t *taskq) | vn_rele_async(vnode_t *vp, taskq_t *taskq) | ||||
{ | { | ||||
VERIFY(vp->v_count > 0); | VERIFY(vp->v_count > 0); | ||||
if (refcount_release_if_not_last(&vp->v_usecount)) { | if (refcount_release_if_not_last(&vp->v_usecount)) { | ||||
vdrop(vp); | |||||
return; | return; | ||||
} | } | ||||
VERIFY(taskq_dispatch((taskq_t *)taskq, | VERIFY(taskq_dispatch((taskq_t *)taskq, | ||||
(task_func_t *)vrele, vp, TQ_SLEEP) != 0); | (task_func_t *)vrele, vp, TQ_SLEEP) != 0); | ||||
} | } |