1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Refine the assertions in vm_page_alloc().

This commit is contained in:
Alan Cox 2003-01-04 19:07:13 +00:00
parent ceb0f624bc
commit 009f3e7a1e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108675

View File

@ -757,12 +757,12 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
vm_pindex_t color;
int page_req, s;
GIANT_REQUIRED;
#ifdef INVARIANTS
if ((req & VM_ALLOC_NOOBJ) == 0) {
KASSERT(object != NULL,
("vm_page_alloc: NULL object."));
mtx_assert(object == kmem_object ? &object->mtx : &Giant,
MA_OWNED);
KASSERT(!vm_page_lookup(object, pindex),
("vm_page_alloc: page already allocated"));
}