* mpte will be NULL for KVM page table pages, there is no need to track
the wire count. Conditionalize-out the unwiring call.
* This is believed to be (this time for sure to the third power!) the
PG_BUSY crash that vsrinivas was getting on i386 related to paging
in a swapped kernel pipe buffer.
if (*pte) {
KKASSERT((*pte & PG_FRAME) == (newpte & PG_FRAME));
- if (vm_page_unwire_quick(mpte))
+ if (mpte && vm_page_unwire_quick(mpte))
panic("pmap_enter: Insufficient wire_count");
}
} else {
if (*pte) {
KKASSERT((*pte & PG_FRAME) == (newpte & PG_FRAME));
- if (vm_page_unwire_quick(mpte))
+ if (mpte && vm_page_unwire_quick(mpte))
panic("pmap_enter: Insufficient wire_count");
}
}