Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_subr.c
Show First 20 Lines • Show All 6,016 Lines • ▼ Show 20 Lines | while (vp != NULL) { | ||||
if (vp->v_type == VMARKER) { | if (vp->v_type == VMARKER) { | ||||
vp = TAILQ_NEXT(vp, v_actfreelist); | vp = TAILQ_NEXT(vp, v_actfreelist); | ||||
continue; | continue; | ||||
} | } | ||||
/* | /* | ||||
* Try-lock because this is the wrong lock order. If that does | * Try-lock because this is the wrong lock order. If that does | ||||
* not succeed, drop the mount vnode list lock and try to | * not succeed, drop the mount vnode list lock and try to | ||||
* reacquire it and the vnode interlock in the right order. | * reacquire it and the vnode interlock in the right order. | ||||
* | |||||
* We VI_TRYLOCK_CONTENDED since with the sheer number of | |||||
* vnodes to be inspected quite a few of them can already have | |||||
* the interlock held if the machine is under load. | |||||
*/ | */ | ||||
if (!VI_TRYLOCK(vp) && | if (!VI_TRYLOCK_CONTENDED(vp) && | ||||
!mnt_vnode_next_active_relock(*mvp, mp, vp)) | !mnt_vnode_next_active_relock(*mvp, mp, vp)) | ||||
goto restart; | goto restart; | ||||
KASSERT(vp->v_type != VMARKER, ("locked marker %p", vp)); | KASSERT(vp->v_type != VMARKER, ("locked marker %p", vp)); | ||||
KASSERT(vp->v_mount == mp || vp->v_mount == NULL, | KASSERT(vp->v_mount == mp || vp->v_mount == NULL, | ||||
("alien vnode on the active list %p %p", vp, mp)); | ("alien vnode on the active list %p %p", vp, mp)); | ||||
if (vp->v_mount == mp && (vp->v_iflag & VI_DOOMED) == 0) | if (vp->v_mount == mp && (vp->v_iflag & VI_DOOMED) == 0) | ||||
break; | break; | ||||
nvp = TAILQ_NEXT(vp, v_actfreelist); | nvp = TAILQ_NEXT(vp, v_actfreelist); | ||||
▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines |