Microoptimize: in qsync loop over mount vnodes, only unlock mount

interlock after we committed to try to vget() the vnode.

Submitted by:	bde
Reviewed by:	mckusick
Tested by:	pho
MFC after:	1 week
This commit is contained in:
kib 2012-03-28 13:56:18 +00:00
parent 1f7d5397de
commit 378ad5717c

View File

@ -1061,12 +1061,11 @@ qsync(struct mount *mp)
again:
MNT_VNODE_FOREACH(vp, mp, mvp) {
VI_LOCK(vp);
MNT_IUNLOCK(mp);
if (vp->v_type == VNON) {
VI_UNLOCK(vp);
MNT_ILOCK(mp);
continue;
}
MNT_IUNLOCK(mp);
error = vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td);
if (error) {
MNT_ILOCK(mp);