Changeset View
Changeset View
Standalone View
Standalone View
sys/vm/vm_pager.c
Show First 20 Lines • Show All 332 Lines • ▼ Show 20 Lines | if (r != VM_PAGER_OK) | ||||
return (r); | return (r); | ||||
for (int i = 0; i < count; i++) { | for (int i = 0; i < count; i++) { | ||||
/* | /* | ||||
* If pager has replaced a page, assert that it had | * If pager has replaced a page, assert that it had | ||||
* updated the array. | * updated the array. | ||||
*/ | */ | ||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
VM_OBJECT_RLOCK(object); | KASSERT(m[i] == vm_page_relookup(object, pindex++), | ||||
KASSERT(m[i] == vm_page_lookup(object, pindex++), | |||||
("%s: mismatch page %p pindex %ju", __func__, | ("%s: mismatch page %p pindex %ju", __func__, | ||||
m[i], (uintmax_t )pindex - 1)); | m[i], (uintmax_t )pindex - 1)); | ||||
VM_OBJECT_RUNLOCK(object); | |||||
#endif | #endif | ||||
/* | /* | ||||
* Zero out partially filled data. | * Zero out partially filled data. | ||||
*/ | */ | ||||
if (m[i]->valid != VM_PAGE_BITS_ALL) | if (m[i]->valid != VM_PAGE_BITS_ALL) | ||||
vm_page_zero_invalid(m[i], TRUE); | vm_page_zero_invalid(m[i], TRUE); | ||||
} | } | ||||
return (VM_PAGER_OK); | return (VM_PAGER_OK); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |