Do not bother walking mount point vnode list just to calculate

the number of vnodes. Use precomputed mp->mnt_nvnodelistsize
value instead.
This commit is contained in:
Alexander Kabaev 2003-11-01 04:36:50 +00:00
parent 85bdc65a80
commit b792e03079

View File

@ -351,11 +351,7 @@ union_unmount(mp, mntflags, td)
int n;
/* count #vnodes held on mount list */
mtx_lock(&mntvnode_mtx);
n = 0;
TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes)
n++;
mtx_unlock(&mntvnode_mtx);
n = mp->mnt_nvnodelistsize;
/* if this is unchanged then stop */
if (n == freeing)