summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_contig.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2009-06-17 04:57:32 +0000
committeralc <alc@FreeBSD.org>2009-06-17 04:57:32 +0000
commitcb610fa25db7ab8b783a9efb6332ebbd3715fc0b (patch)
treed4456f2d3985c91f2ad8478d6d2353bb7b7f2bdf /sys/vm/vm_contig.c
parent66eb71f1a7022ae056b509763e4655a8f0d4711d (diff)
downloadFreeBSD-src-cb610fa25db7ab8b783a9efb6332ebbd3715fc0b.zip
FreeBSD-src-cb610fa25db7ab8b783a9efb6332ebbd3715fc0b.tar.gz
Make the maintenance of a page's valid bits by contigmalloc() more like
kmem_alloc() and kmem_malloc(). Specifically, defer the setting of the page's valid bits until contigmapping() when the mapping is known to be successful.
Diffstat (limited to 'sys/vm/vm_contig.c')
-rw-r--r--sys/vm/vm_contig.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c
index 6c82e14..845077c 100644
--- a/sys/vm/vm_contig.c
+++ b/sys/vm/vm_contig.c
@@ -218,6 +218,7 @@ contigmapping(vm_page_t m, vm_pindex_t npages, int flags)
OFF_TO_IDX(tmp_addr - VM_MIN_KERNEL_ADDRESS));
if ((flags & M_ZERO) && !(m[i].flags & PG_ZERO))
pmap_zero_page(&m[i]);
+ m[i].valid = VM_PAGE_BITS_ALL;
tmp_addr += PAGE_SIZE;
}
VM_OBJECT_UNLOCK(object);
OpenPOWER on IntegriCloud