* allow unmount even if rootvp has a usecount > 1 provided that
MNT_FORCE is given * decrease cargo cult index by getting rid of commented sections with mntflushbuf() in them - AFAICT the call was removed from our kernel over 13 years ago with the 4.4BSDlite import
This commit is contained in:
parent
afc9294f4e
commit
b7d4ee5f17
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fdesc_vfsops.c,v 1.64 2007/01/19 14:49:10 hannken Exp $ */
|
||||
/* $NetBSD: fdesc_vfsops.c,v 1.65 2007/07/08 23:58:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993, 1995
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fdesc_vfsops.c,v 1.64 2007/01/19 14:49:10 hannken Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fdesc_vfsops.c,v 1.65 2007/07/08 23:58:53 pooka Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -129,12 +129,7 @@ fdesc_unmount(struct mount *mp, int mntflags, struct lwp *l)
|
|||
if (mntflags & MNT_FORCE)
|
||||
flags |= FORCECLOSE;
|
||||
|
||||
/*
|
||||
* Clear out buffer cache. I don't think we
|
||||
* ever get anything cached at this level at the
|
||||
* moment, but who knows...
|
||||
*/
|
||||
if (rtvp->v_usecount > 1)
|
||||
if (rtvp->v_usecount > 1 && (mntflags & MNT_FORCE) == 0)
|
||||
return (EBUSY);
|
||||
if ((error = vflush(mp, rtvp, flags)) != 0)
|
||||
return (error);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: null_vfsops.c,v 1.63 2007/04/08 11:20:45 hannken Exp $ */
|
||||
/* $NetBSD: null_vfsops.c,v 1.64 2007/07/08 23:58:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 National Aeronautics & Space Administration
|
||||
|
@ -74,7 +74,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.63 2007/04/08 11:20:45 hannken Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.64 2007/07/08 23:58:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -226,17 +226,7 @@ nullfs_unmount(struct mount *mp, int mntflags, struct lwp *l)
|
|||
if (mntflags & MNT_FORCE)
|
||||
flags |= FORCECLOSE;
|
||||
|
||||
/*
|
||||
* Clear out buffer cache. I don't think we
|
||||
* ever get anything cached at this level at the
|
||||
* moment, but who knows...
|
||||
*/
|
||||
#if 0
|
||||
mntflushbuf(mp, 0);
|
||||
if (mntinvalbuf(mp, 1))
|
||||
return (EBUSY);
|
||||
#endif
|
||||
if (null_rootvp->v_usecount > 1)
|
||||
if (null_rootvp->v_usecount > 1 && (mntflags & MNT_FORCE) == 0)
|
||||
return (EBUSY);
|
||||
if ((error = vflush(mp, null_rootvp, flags)) != 0)
|
||||
return (error);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: overlay_vfsops.c,v 1.38 2007/04/08 11:20:48 hannken Exp $ */
|
||||
/* $NetBSD: overlay_vfsops.c,v 1.39 2007/07/08 23:58:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000 National Aeronautics & Space Administration
|
||||
|
@ -74,7 +74,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.38 2007/04/08 11:20:48 hannken Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.39 2007/07/08 23:58:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -215,17 +215,7 @@ ov_unmount(struct mount *mp, int mntflags, struct lwp *l)
|
|||
if (mntflags & MNT_FORCE)
|
||||
flags |= FORCECLOSE;
|
||||
|
||||
/*
|
||||
* Clear out buffer cache. I don't think we
|
||||
* ever get anything cached at this level at the
|
||||
* moment, but who knows...
|
||||
*/
|
||||
#if 0
|
||||
mntflushbuf(mp, 0);
|
||||
if (mntinvalbuf(mp, 1))
|
||||
return (EBUSY);
|
||||
#endif
|
||||
if (overlay_rootvp->v_usecount > 1)
|
||||
if (overlay_rootvp->v_usecount > 1 && (mntflags & MNT_FORCE) == 0)
|
||||
return (EBUSY);
|
||||
if ((error = vflush(mp, overlay_rootvp, flags)) != 0)
|
||||
return (error);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: portal_vfsops.c,v 1.60 2007/01/19 14:49:11 hannken Exp $ */
|
||||
/* $NetBSD: portal_vfsops.c,v 1.61 2007/07/08 23:58:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993, 1995
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: portal_vfsops.c,v 1.60 2007/01/19 14:49:11 hannken Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: portal_vfsops.c,v 1.61 2007/07/08 23:58:53 pooka Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
@ -183,17 +183,7 @@ portal_unmount(struct mount *mp, int mntflags, struct lwp *l)
|
|||
if (mntflags & MNT_FORCE)
|
||||
flags |= FORCECLOSE;
|
||||
|
||||
/*
|
||||
* Clear out buffer cache. I don't think we
|
||||
* ever get anything cached at this level at the
|
||||
* moment, but who knows...
|
||||
*/
|
||||
#ifdef notyet
|
||||
mntflushbuf(mp, 0);
|
||||
if (mntinvalbuf(mp, 1))
|
||||
return (EBUSY);
|
||||
#endif
|
||||
if (rtvp->v_usecount > 1)
|
||||
if (rtvp->v_usecount > 1 && (mntflags & MNT_FORCE) == 0)
|
||||
return (EBUSY);
|
||||
if ((error = vflush(mp, rtvp, flags)) != 0)
|
||||
return (error);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umap_vfsops.c,v 1.64 2007/04/08 11:20:48 hannken Exp $ */
|
||||
/* $NetBSD: umap_vfsops.c,v 1.65 2007/07/08 23:58:53 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.64 2007/04/08 11:20:48 hannken Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.65 2007/07/08 23:58:53 pooka Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -250,17 +250,7 @@ umapfs_unmount(struct mount *mp, int mntflags, struct lwp *l)
|
|||
if (mntflags & MNT_FORCE)
|
||||
flags |= FORCECLOSE;
|
||||
|
||||
/*
|
||||
* Clear out buffer cache. I don't think we
|
||||
* ever get anything cached at this level at the
|
||||
* moment, but who knows...
|
||||
*/
|
||||
#ifdef notyet
|
||||
mntflushbuf(mp, 0);
|
||||
if (mntinvalbuf(mp, 1))
|
||||
return (EBUSY);
|
||||
#endif
|
||||
if (rtvp->v_usecount > 1)
|
||||
if (rtvp->v_usecount > 1 && (mntflags & MNT_FORCE) == 0)
|
||||
return (EBUSY);
|
||||
if ((error = vflush(mp, rtvp, flags)) != 0)
|
||||
return (error);
|
||||
|
|
Loading…
Reference in New Issue