summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-03-19 05:13:22 +0000
committerdyson <dyson@FreeBSD.org>1996-03-19 05:13:22 +0000
commit1fa4d692594eafbf8e84846f170b918ee0afc781 (patch)
tree8061bebe5a673fb545013ff249887aadb288d51e /sys/fs
parentb10555454e573b2dcc7c0d03059ffa2ad6a30b8f (diff)
downloadFreeBSD-src-1fa4d692594eafbf8e84846f170b918ee0afc781.zip
FreeBSD-src-1fa4d692594eafbf8e84846f170b918ee0afc781.tar.gz
Fix the problem that unmounting filesystems that are backed by a VMIO
device have reference count problems. We mark the underlying object ono-persistent, and account for the reference count that the VM system maintainsfor the special device close. This should fix the removable device problem.
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/specfs/spec_vnops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index 180be5f..2dd6859 100644
--- a/sys/fs/specfs/spec_vnops.c
+++ b/sys/fs/specfs/spec_vnops.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)spec_vnops.c 8.6 (Berkeley) 4/9/94
- * $Id: spec_vnops.c,v 1.27 1996/01/01 20:20:45 phk Exp $
+ * $Id: spec_vnops.c,v 1.28 1996/03/09 07:02:52 dyson Exp $
*/
#include <sys/param.h>
@@ -625,7 +625,8 @@ spec_close(ap)
* sum of the reference counts on all the aliased
* vnodes descends to one, we are on last close.
*/
- if (vcount(vp) > 1 && (vp->v_flag & VXLOCK) == 0)
+ if ((vcount(vp) > ((vp->v_flag & VVMIO)?2:1)) &&
+ (vp->v_flag & VXLOCK) == 0)
return (0);
devclose = bdevsw[major(dev)]->d_close;
mode = S_IFBLK;
OpenPOWER on IntegriCloud