summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2003-01-11 20:07:17 +0000
committeralc <alc@FreeBSD.org>2003-01-11 20:07:17 +0000
commitd833c390ba500fc4f0bc5526299583691afdf384 (patch)
tree1793b826b9651da50ab1cf5617dbf797c322d93e /sys/vm
parent8eb42e5ece9fc5bd4909eaf2f875938ade30af90 (diff)
downloadFreeBSD-src-d833c390ba500fc4f0bc5526299583691afdf384.zip
FreeBSD-src-d833c390ba500fc4f0bc5526299583691afdf384.tar.gz
In vm_page_alloc(), fuse two if statements that are conditioned on the same
expression.
Diffstat (limited to 'sys/vm')
-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