summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-04-24 04:31:25 +0000
committeralc <alc@FreeBSD.org>2003-04-24 04:31:25 +0000
commit87da2c3cf37429dd7554a13d8b70a046ccc3edcf (patch)
tree524c091529a13b4f30095fe4af93a54b4cd973f6 /sys/nfsserver
parent51f01cb3f731c451c22c07d8bb6a6e9ecffb72d1 (diff)
downloadFreeBSD-src-87da2c3cf37429dd7554a13d8b70a046ccc3edcf.zip
FreeBSD-src-87da2c3cf37429dd7554a13d8b70a046ccc3edcf.tar.gz
- Acquire the vm_object's lock when performing vm_object_page_clean().
- Add a parameter to vm_pageout_flush() that tells vm_pageout_flush() whether its caller has locked the vm_object. (This is a temporary measure to bootstrap vm_object locking.)
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_serv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/nfsserver/nfs_serv.c b/sys/nfsserver/nfs_serv.c
index 5c8554e..7573444 100644
--- a/sys/nfsserver/nfs_serv.c
+++ b/sys/nfsserver/nfs_serv.c
@@ -3654,7 +3654,9 @@ nfsrv_commit(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
*/
if (vp->v_object &&
(vp->v_object->flags & OBJ_MIGHTBEDIRTY)) {
+ VM_OBJECT_LOCK(vp->v_object);
vm_object_page_clean(vp->v_object, 0, 0, OBJPC_SYNC);
+ VM_OBJECT_UNLOCK(vp->v_object);
}
error = VOP_FSYNC(vp, cred, MNT_WAIT, td);
} else {
@@ -3683,7 +3685,9 @@ nfsrv_commit(struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
if (vp->v_object &&
(vp->v_object->flags & OBJ_MIGHTBEDIRTY)) {
+ VM_OBJECT_LOCK(vp->v_object);
vm_object_page_clean(vp->v_object, off / PAGE_SIZE, (cnt + PAGE_MASK) / PAGE_SIZE, OBJPC_SYNC);
+ VM_OBJECT_UNLOCK(vp->v_object);
}
s = splbio();
OpenPOWER on IntegriCloud