summaryrefslogtreecommitdiffstats
path: root/sys/fs/nullfs/null_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/nullfs/null_vfsops.c')
-rw-r--r--sys/fs/nullfs/null_vfsops.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index dfaefe3..8573398 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -229,7 +229,6 @@ nullfs_unmount(mp, mntflags, p)
int mntflags;
struct proc *p;
{
- struct vnode *vp = MOUNTTONULLMOUNT(mp)->nullm_rootvp;
void *mntdata;
int error;
int flags = 0;
@@ -239,31 +238,11 @@ nullfs_unmount(mp, mntflags, p)
if (mntflags & MNT_FORCE)
flags |= FORCECLOSE;
- error = VFS_ROOT(mp, &vp);
- if (error)
- return (error);
- if (vp->v_usecount > 2) {
- NULLFSDEBUG("nullfs_unmount: rootvp is busy(%d)\n",
- vp->v_usecount);
- vput(vp);
- return (EBUSY);
- }
- error = vflush(mp, vp, flags);
+ /* There is 1 extra root vnode reference (nullm_rootvp). */
+ error = vflush(mp, 1, flags);
if (error)
return (error);
-#ifdef NULLFS_DEBUG
- vprint("alias root of lower", vp);
-#endif
- vput(vp);
- /*
- * Release reference on underlying root vnode
- */
- vrele(vp);
- /*
- * And blow it away for future re-use
- */
- vgone(vp);
/*
* Finally, throw away the null_mount structure
*/
OpenPOWER on IntegriCloud