diff options
author | 2004-03-03 06:01:48 +0000 | |
---|---|---|
committer | 2004-03-03 06:01:48 +0000 | |
commit | e38af6bb98129329d31d409c1173a8db9a3ad3c5 (patch) | |
tree | ef63a43f4d9db87a64374ea6566f2d083a096287 | |
parent | save room for nul, so we can unmount later. pr2327 from peter werner (diff) | |
download | wireguard-openbsd-e38af6bb98129329d31d409c1173a8db9a3ad3c5.tar.xz wireguard-openbsd-e38af6bb98129329d31d409c1173a8db9a3ad3c5.zip |
support forced unmounts. pr2394 from peter werner
-rw-r--r-- | sys/miscfs/nullfs/null_vfsops.c | 4 | ||||
-rw-r--r-- | sys/miscfs/portal/portal_vfsops.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c index a30f4a42c8a..6bb7921bfe6 100644 --- a/sys/miscfs/nullfs/null_vfsops.c +++ b/sys/miscfs/nullfs/null_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: null_vfsops.c,v 1.17 2003/08/14 07:46:39 mickey Exp $ */ +/* $OpenBSD: null_vfsops.c,v 1.18 2004/03/03 06:01:49 tedu Exp $ */ /* $NetBSD: null_vfsops.c,v 1.38 2002/09/21 18:09:29 christos Exp $ */ /* @@ -248,7 +248,7 @@ nullfs_unmount(mp, mntflags, p) if (mntinvalbuf(mp, 1)) return (EBUSY); #endif - if (null_rootvp->v_usecount > 1) + if (null_rootvp->v_usecount > 1 && !(flags & FORCECLOSE)) return (EBUSY); if ((error = vflush(mp, null_rootvp, flags)) != 0) return (error); diff --git a/sys/miscfs/portal/portal_vfsops.c b/sys/miscfs/portal/portal_vfsops.c index 23027807637..8f56b899147 100644 --- a/sys/miscfs/portal/portal_vfsops.c +++ b/sys/miscfs/portal/portal_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: portal_vfsops.c,v 1.18 2003/08/14 07:46:39 mickey Exp $ */ +/* $OpenBSD: portal_vfsops.c,v 1.19 2004/03/03 06:01:48 tedu Exp $ */ /* $NetBSD: portal_vfsops.c,v 1.14 1996/02/09 22:40:41 christos Exp $ */ /* @@ -171,7 +171,7 @@ portal_unmount(mp, mntflags, p) if (mntinvalbuf(mp, 1)) return (EBUSY); #endif - if (rvp->v_usecount > 1) + if (rvp->v_usecount > 1 && !(flags & FORCECLOSE)) return (EBUSY); if ((error = vflush(mp, rvp, flags)) != 0) return (error); |