aboutsummaryrefslogtreecommitdiff
path: root/sys/miscfs/fdesc
diff options
context:
space:
mode:
authorIan Dowse <iedowse@FreeBSD.org>2001-05-16 18:04:37 +0000
committerIan Dowse <iedowse@FreeBSD.org>2001-05-16 18:04:37 +0000
commit0864ef1e8a449b1533c7e0ea673e9614aaa9a81f (patch)
treed7aaca11b211abc1efdc147eb5280e6a31ca436e /sys/miscfs/fdesc
parent73cf2c3089f11d4b82c44eef06de12f8f86cc47e (diff)
Notes
Diffstat (limited to 'sys/miscfs/fdesc')
-rw-r--r--sys/miscfs/fdesc/fdesc_vfsops.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/miscfs/fdesc/fdesc_vfsops.c b/sys/miscfs/fdesc/fdesc_vfsops.c
index 900e1de1d0f7..a758bb82ad6d 100644
--- a/sys/miscfs/fdesc/fdesc_vfsops.c
+++ b/sys/miscfs/fdesc/fdesc_vfsops.c
@@ -114,7 +114,6 @@ fdesc_unmount(mp, mntflags, p)
{
int error;
int flags = 0;
- struct vnode *rootvp = VFSTOFDESC(mp)->f_root;
if (mntflags & MNT_FORCE)
flags |= FORCECLOSE;
@@ -123,21 +122,14 @@ fdesc_unmount(mp, mntflags, p)
* Clear out buffer cache. I don't think we
* ever get anything cached at this level at the
* moment, but who knows...
+ *
+ * There is 1 extra root vnode reference corresponding
+ * to f_root.
*/
- if (rootvp->v_usecount > 1)
- return (EBUSY);
- if ((error = vflush(mp, rootvp, flags)) != 0)
+ if ((error = vflush(mp, 1, flags)) != 0)
return (error);
/*
- * Release reference on underlying root vnode
- */
- vrele(rootvp);
- /*
- * And blow it away for future re-use
- */
- vgone(rootvp);
- /*
* Finally, throw away the fdescmount structure
*/
free(mp->mnt_data, M_FDESCMNT); /* XXX */