summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_page.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-04-24 21:36:23 +0000
committeralc <alc@FreeBSD.org>2004-04-24 21:36:23 +0000
commit800747333a8939d694a9eb3ff9415a29796c9dcf (patch)
treed2faffd9781df5798f4b236f34c01d96fef8dff3 /sys/vm/vm_page.c
parent106fdfcb2b41f5994fcce7d63193060ddf3fd6ec (diff)
downloadFreeBSD-src-800747333a8939d694a9eb3ff9415a29796c9dcf.zip
FreeBSD-src-800747333a8939d694a9eb3ff9415a29796c9dcf.tar.gz
Update the comment describing vm_page_grab() to reflect the previous
revision and correct some of its style errors.
Diffstat (limited to 'sys/vm/vm_page.c')
-rw-r--r--sys/vm/vm_page.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 45e3fc9..1eb4eac 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1421,7 +1421,8 @@ vm_page_dontneed(vm_page_t m)
/*
* Grab a page, waiting until we are waken up due to the page
* changing state. We keep on waiting, if the page continues
- * to be in the object. If the page doesn't exist, allocate it.
+ * to be in the object. If the page doesn't exist, first allocate it
+ * and then conditionally zero it.
*
* This routine may block.
*/
@@ -1447,23 +1448,21 @@ retrylookup:
vm_page_wire(m);
vm_page_busy(m);
vm_page_unlock_queues();
- return m;
+ return (m);
}
}
-
m = vm_page_alloc(object, pindex, allocflags & ~VM_ALLOC_RETRY);
if (m == NULL) {
VM_OBJECT_UNLOCK(object);
VM_WAIT;
VM_OBJECT_LOCK(object);
if ((allocflags & VM_ALLOC_RETRY) == 0)
- return NULL;
+ return (NULL);
goto retrylookup;
}
if (allocflags & VM_ALLOC_ZERO && (m->flags & PG_ZERO) == 0)
pmap_zero_page(m);
-
- return m;
+ return (m);
}
/*
OpenPOWER on IntegriCloud