Lock the vm object when performing vm_object_page_clean().

Approved by:	re (rwatson)
This commit is contained in:
Alan Cox 2003-05-18 22:02:51 +00:00
parent d7a1c636e1
commit 7f758dabbb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115145

View File

@ -122,8 +122,11 @@ ffs_rawread_sync(struct vnode *vp, struct thread *td)
if ((vp->v_iflag & VI_OBJDIRTY) != 0) {
struct vm_object *obj;
VI_UNLOCK(vp);
if (VOP_GETVOBJECT(vp, &obj) == 0)
if (VOP_GETVOBJECT(vp, &obj) == 0) {
VM_OBJECT_LOCK(obj);
vm_object_page_clean(obj, 0, 0, OBJPC_SYNC);
VM_OBJECT_UNLOCK(obj);
}
VI_LOCK(vp);
}