diff options
Diffstat (limited to 'sys/fs/fdescfs/fdesc_vfsops.c')
-rw-r--r-- | sys/fs/fdescfs/fdesc_vfsops.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index 900e1de..a758bb8 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/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 */ |