diff options
author | kan <kan@FreeBSD.org> | 2003-11-01 04:36:50 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2003-11-01 04:36:50 +0000 |
commit | 3d10139f9f9bf90bad8afc000be11db3d7ae6140 (patch) | |
tree | 5255a548ae300c34491c9f84d5377d383de1341a /sys/fs/unionfs | |
parent | 6a50a2893c026592f15cd2108e577c869d1ce37e (diff) | |
download | FreeBSD-src-3d10139f9f9bf90bad8afc000be11db3d7ae6140.zip FreeBSD-src-3d10139f9f9bf90bad8afc000be11db3d7ae6140.tar.gz |
Do not bother walking mount point vnode list just to calculate
the number of vnodes. Use precomputed mp->mnt_nvnodelistsize
value instead.
Diffstat (limited to 'sys/fs/unionfs')
-rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index dae39b5..c3f04dc 100644 --- a/sys/fs/unionfs/union_vfsops.c +++ b/sys/fs/unionfs/union_vfsops.c @@ -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) |