o Update locking around vm_object_page_remove() in vm_map_clean()

to use the new macros.
 o Remove unnecessary increment and decrement of the vm_object's
   reference count in vm_map_clean().
This commit is contained in:
Alan Cox 2003-04-19 01:43:32 +00:00
parent 32d9e2d216
commit 034b3d7a6f

View File

@ -1981,14 +1981,12 @@ vm_map_clean(
if (object && invalidate &&
((object->type == OBJT_VNODE) ||
(object->type == OBJT_DEVICE))) {
vm_object_reference(object);
vm_object_lock(object);
VM_OBJECT_LOCK(object);
vm_object_page_remove(object,
OFF_TO_IDX(offset),
OFF_TO_IDX(offset + size + PAGE_MASK),
FALSE);
vm_object_unlock(object);
vm_object_deallocate(object);
VM_OBJECT_UNLOCK(object);
}
start += size;
}