summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/vm/vm_page.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 5bd612a..a96b8ac 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -757,7 +757,8 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
vm_pindex_t color;
int page_req, s;
-#ifdef INVARIANTS
+ page_req = req & VM_ALLOC_CLASS_MASK;
+
if ((req & VM_ALLOC_NOOBJ) == 0) {
KASSERT(object != NULL,
("vm_page_alloc: NULL object."));
@@ -765,14 +766,8 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
MA_OWNED);
KASSERT(!vm_page_lookup(object, pindex),
("vm_page_alloc: page already allocated"));
- }
-#endif
-
- page_req = req & VM_ALLOC_CLASS_MASK;
-
- if ((req & VM_ALLOC_NOOBJ) == 0)
color = pindex + object->pg_color;
- else
+ } else
color = pindex;
/*
OpenPOWER on IntegriCloud