Assert that the vm object lock is held in vm_page_alloc().

This commit is contained in:
Alan Cox 2003-08-20 20:24:29 +00:00
parent c603549f15
commit 891c1d4bd3

View File

@ -759,6 +759,7 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
if ((req & VM_ALLOC_NOOBJ) == 0) {
KASSERT(object != NULL,
("vm_page_alloc: NULL object."));
VM_OBJECT_LOCK_ASSERT(object, MA_OWNED);
KASSERT(!vm_page_lookup(object, pindex),
("vm_page_alloc: page already allocated"));
color = (pindex + object->pg_color) & PQ_L2_MASK;