Update locking around vm_object_page_remove() to use the new macros.

This commit is contained in:
alc 2003-04-18 16:39:03 +00:00
parent b41f585c1a
commit 83fe46be18
2 changed files with 4 additions and 4 deletions

View File

@ -1181,10 +1181,10 @@ vinvalbuf(vp, flags, cred, td, slpflag, slptimeo)
* Destroy the copy in the VM cache, too.
*/
if (VOP_GETVOBJECT(vp, &object) == 0) {
vm_object_lock(object);
VM_OBJECT_LOCK(object);
vm_object_page_remove(object, 0, 0,
(flags & V_SAVE) ? TRUE : FALSE);
vm_object_unlock(object);
VM_OBJECT_UNLOCK(object);
}
#ifdef INVARIANTS

View File

@ -307,10 +307,10 @@ vnode_pager_setsize(vp, nsize)
*/
if (nsize < object->un_pager.vnp.vnp_size) {
if (nobjsize < object->size) {
vm_object_lock(object);
VM_OBJECT_LOCK(object);
vm_object_page_remove(object, nobjsize, object->size,
FALSE);
vm_object_unlock(object);
VM_OBJECT_UNLOCK(object);
}
/*
* this gets rid of garbage at the end of a page that is now