diff options
author | dyson <dyson@FreeBSD.org> | 1996-03-19 05:13:22 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1996-03-19 05:13:22 +0000 |
commit | 1fa4d692594eafbf8e84846f170b918ee0afc781 (patch) | |
tree | 8061bebe5a673fb545013ff249887aadb288d51e /sys/miscfs | |
parent | b10555454e573b2dcc7c0d03059ffa2ad6a30b8f (diff) | |
download | FreeBSD-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/miscfs')
-rw-r--r-- | sys/miscfs/specfs/spec_vnops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c index 180be5f..2dd6859 100644 --- a/sys/miscfs/specfs/spec_vnops.c +++ b/sys/miscfs/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; |