summaryrefslogtreecommitdiffstats
path: root/sys/fs/unionfs
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-11-01 04:36:50 +0000
committerkan <kan@FreeBSD.org>2003-11-01 04:36:50 +0000
commit3d10139f9f9bf90bad8afc000be11db3d7ae6140 (patch)
tree5255a548ae300c34491c9f84d5377d383de1341a /sys/fs/unionfs
parent6a50a2893c026592f15cd2108e577c869d1ce37e (diff)
downloadFreeBSD-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.c6
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)
OpenPOWER on IntegriCloud