diff options
Diffstat (limited to 'sys/vm/vm_glue.c')
-rw-r--r-- | sys/vm/vm_glue.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index ceae013..505d1e3 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -319,10 +319,13 @@ vm_proc_swapin(struct proc *p) rv = vm_pager_get_pages(upobj, &m, 1, 0); if (rv != VM_PAGER_OK) panic("vm_proc_swapin: cannot get upage"); - m = vm_page_lookup(upobj, i); - m->valid = VM_PAGE_BITS_ALL; } ma[i] = m; + } + if (upobj->resident_page_count != UAREA_PAGES) + panic("vm_proc_swapin: lost pages from upobj"); + TAILQ_FOREACH(m, &upobj->memq, listq) { + m->valid = VM_PAGE_BITS_ALL; vm_page_wire(m); vm_page_wakeup(m); vm_page_flag_set(m, PG_MAPPED | PG_WRITEABLE); |