Update locking around vm_object_page_remove() to use the new macros.
This commit is contained in:
parent
b41f585c1a
commit
83fe46be18
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user