aboutsummaryrefslogtreecommitdiff
path: root/sys/miscfs/specfs
diff options
context:
space:
mode:
authorJohn Dyson <dyson@FreeBSD.org>1996-08-21 21:56:23 +0000
committerJohn Dyson <dyson@FreeBSD.org>1996-08-21 21:56:23 +0000
commit6476c0d204848007fc6da182e3935f01e267d77f (patch)
tree07a76a1b97882ad9c1e3805d05f820bc976c60bd /sys/miscfs/specfs
parentfe6869c2d0e28a9e4e6af9bcaf8f65506ac68e86 (diff)
downloadsrc-6476c0d204848007fc6da182e3935f01e267d77f.tar.gz
src-6476c0d204848007fc6da182e3935f01e267d77f.zip
Even though this looks like it, this is not a complex code change.
The interface into the "VMIO" system has changed to be more consistant and robust. Essentially, it is now no longer necessary to call vn_open to get merged VM/Buffer cache operation, and exceptional conditions such as merged operation of VBLK devices is simpler and more correct. This code corrects a potentially large set of problems including the problems with ktrace output and loaded systems, file create/deletes, etc. Most of the changes to NFS are cosmetic and name changes, eliminating a layer of subroutine calls. The direct calls to vput/vrele have been re-instituted for better cross platform compatibility. Reviewed by: davidg
Notes
Notes: svn path=/head/; revision=17761
Diffstat (limited to 'sys/miscfs/specfs')
-rw-r--r--sys/miscfs/specfs/spec_vnops.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index a3d87e3b4b9f..58241c2caffa 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.29 1996/03/19 05:13:17 dyson Exp $
+ * $Id: spec_vnops.c,v 1.30 1996/07/27 03:50:31 dyson Exp $
*/
#include <sys/param.h>
@@ -57,6 +57,7 @@
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
#include <vm/vnode_pager.h>
+#include <vm/vm_extern.h>
#include <miscfs/specfs/specdev.h>
@@ -625,9 +626,13 @@ spec_close(ap)
* sum of the reference counts on all the aliased
* vnodes descends to one, we are on last close.
*/
- if ((vcount(vp) > ((vp->v_flag & VVMIO)?2:1)) &&
+ if ((vcount(vp) > (vp->v_object?2:1)) &&
(vp->v_flag & VXLOCK) == 0)
return (0);
+
+ if (vp->v_object)
+ vnode_pager_uncache(vp);
+
devclose = bdevsw[major(dev)]->d_close;
mode = S_IFBLK;
break;