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
This commit is contained in:
alc 2012-11-21 06:26:18 +00:00
parent 79f863d433
commit e12b2ad698

View File

@ -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;