summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1996-08-21 21:56:23 +0000
committerdyson <dyson@FreeBSD.org>1996-08-21 21:56:23 +0000
commit966cbc5d29e66792108ec7d19f731b46d171245b (patch)
tree07a76a1b97882ad9c1e3805d05f820bc976c60bd /sys/fs
parent2d0ae2fc91a319615c14ec10da1161bab780f734 (diff)
downloadFreeBSD-src-966cbc5d29e66792108ec7d19f731b46d171245b.zip
FreeBSD-src-966cbc5d29e66792108ec7d19f731b46d171245b.tar.gz
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
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/specfs/spec_vnops.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c
index a3d87e3..58241c2 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.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;
OpenPOWER on IntegriCloud