- Extend the scope of two existing vm_object locks to cover

swap_pager_freespace().
This commit is contained in:
alc 2003-04-26 05:30:56 +00:00
parent 55771d518f
commit 20559dc8d8
2 changed files with 2 additions and 2 deletions

View File

@ -2144,7 +2144,6 @@ vm_map_delete(vm_map_t map, vm_offset_t start, vm_offset_t end)
vm_object_collapse(object);
VM_OBJECT_LOCK(object);
vm_object_page_remove(object, offidxstart, offidxend, FALSE);
VM_OBJECT_UNLOCK(object);
if (object->type == OBJT_SWAP) {
swap_pager_freespace(object, offidxstart, count);
}
@ -2152,6 +2151,7 @@ vm_map_delete(vm_map_t map, vm_offset_t start, vm_offset_t end)
offidxstart < object->size) {
object->size = offidxstart;
}
VM_OBJECT_UNLOCK(object);
}
mtx_unlock(&Giant);
}

View File

@ -1797,10 +1797,10 @@ vm_object_coalesce(vm_object_t prev_object, vm_pindex_t prev_pindex,
vm_object_page_remove(prev_object,
next_pindex,
next_pindex + next_size, FALSE);
VM_OBJECT_UNLOCK(prev_object);
if (prev_object->type == OBJT_SWAP)
swap_pager_freespace(prev_object,
next_pindex, next_size);
VM_OBJECT_UNLOCK(prev_object);
}
/*