summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1998-01-31 11:56:53 +0000
committerdyson <dyson@FreeBSD.org>1998-01-31 11:56:53 +0000
commit2aacd1ab4f077361f06a6cce5d526955a6743e48 (patch)
treeb18bcbfaf5b7cd766657c55c1d3a3785eb442113 /sys/nfsserver
parent89164485a3d81c25a2b3f202e5dc2ee0aedddd3f (diff)
downloadFreeBSD-src-2aacd1ab4f077361f06a6cce5d526955a6743e48.zip
FreeBSD-src-2aacd1ab4f077361f06a6cce5d526955a6743e48.tar.gz
Change the busy page mgmt, so that when pages are freed, they
MUST be PG_BUSY. It is bogus to free a page that isn't busy, because it is in a state of being "unavailable" when being freed. The additional advantage is that the page_remove code has a better cross-check that the page should be busy and unavailable for other use. There were some minor problems with the collapse code, and this plugs those subtile "holes." Also, the vfs_bio code wasn't checking correctly for PG_BUSY pages. I am going to develop a more consistant scheme for grabbing pages, busy or otherwise. For now, we are stuck with the current morass.
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_serv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 029897b..4bcca7d 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_serv.c 8.3 (Berkeley) 1/12/94
- * $Id: nfs_serv.c,v 1.53 1997/12/27 02:56:34 bde Exp $
+ * $Id: nfs_serv.c,v 1.54 1997/12/29 00:23:34 dyson Exp $
*/
/*
@@ -76,6 +76,7 @@
#include <vm/vm.h>
#include <vm/vm_extern.h>
#include <vm/vm_zone.h>
+#include <vm/vm_object.h>
#include <nfs/nfsproto.h>
#include <nfs/rpcv2.h>
@@ -3123,6 +3124,10 @@ nfsrv_commit(nfsd, slp, procp, mrq)
return (0);
}
for_ret = VOP_GETATTR(vp, &bfor, cred, procp);
+ if (vp->v_object &&
+ (vp->v_object->flags & OBJ_MIGHTBEDIRTY)) {
+ vm_object_page_clean(vp->v_object, 0, 0, TRUE);
+ }
error = VOP_FSYNC(vp, cred, MNT_WAIT, procp);
aft_ret = VOP_GETATTR(vp, &aft, cred, procp);
vput(vp);
OpenPOWER on IntegriCloud