vm_pager: Optimize an assertion

Obtained from:	jeff (object_concurrency patches)
Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D32946
This commit is contained in:
Mark Johnston 2021-11-15 11:33:30 -05:00
parent 1fb99e97e9
commit b0acc3f11b

View File

@ -338,12 +338,11 @@ vm_pager_get_pages(vm_object_t object, vm_page_t *m, int count, int *rbehind,
* updated the array.
*/
#ifdef INVARIANTS
VM_OBJECT_RLOCK(object);
KASSERT(m[i] == vm_page_lookup(object, pindex++),
KASSERT(m[i] == vm_page_relookup(object, pindex++),
("%s: mismatch page %p pindex %ju", __func__,
m[i], (uintmax_t )pindex - 1));
VM_OBJECT_RUNLOCK(object);
#endif
/*
* Zero out partially filled data.
*/