summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2012-11-21 06:26:18 +0000
committeralc <alc@FreeBSD.org>2012-11-21 06:26:18 +0000
commite12b2ad69887617a9d59d6ce40b123e3ea70aeed (patch)
treef9d7596c5bef190c207483715680823af17bad94 /sys/vm
parent79f863d433acf2748aa6b0f4c622a26da1deae60 (diff)
downloadFreeBSD-src-e12b2ad69887617a9d59d6ce40b123e3ea70aeed.zip
FreeBSD-src-e12b2ad69887617a9d59d6ce40b123e3ea70aeed.tar.gz
Correct an error in r230623. When both VM_ALLOC_NODUMP and VM_ALLOC_ZERO
were specified to vm_page_alloc(), PG_NODUMP wasn't being set on the allocated page when it happened to be pre-zeroed. MFC after: 5 days
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_page.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 5758ffe..ecd86de 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1481,13 +1481,13 @@ vm_page_alloc(vm_object_t object, vm_pindex_t pindex, int req)
* must be cleared before the free page queues lock is released.
*/
flags = 0;
- if (req & VM_ALLOC_NODUMP)
- flags |= PG_NODUMP;
if (m->flags & PG_ZERO) {
vm_page_zero_count--;
if (req & VM_ALLOC_ZERO)
flags = PG_ZERO;
}
+ if (req & VM_ALLOC_NODUMP)
+ flags |= PG_NODUMP;
m->flags = flags;
mtx_unlock(&vm_page_queue_free_mtx);
m->aflags = 0;
OpenPOWER on IntegriCloud