FreeBSD: Remove an incorrect assertion in zfs_getpages()

The pages in the array may become valid after this initial unbusying,
so the assertion only holds during the first iteration of the outer
loop.

Later in zfs_getpages(), the dmu_read_pages() loop handles already-valid
pages.  Just drop the assertion, it's not terribly useful.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reported-by: Peter Holm <pho@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Sponsored-by: Klara, Inc.
Closes #16810
Closes #16834
This commit is contained in:
Mark Johnston 2024-12-04 14:24:50 -05:00 committed by GitHub
parent 4b4e346b9f
commit 0e020bf3e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3960,10 +3960,8 @@ zfs_getpages(struct vnode *vp, vm_page_t *ma, int count, int *rbehind,
* to the page fault handler's OOM logic, but this is * to the page fault handler's OOM logic, but this is
* the best we can do for now. * the best we can do for now.
*/ */
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++)
ASSERT(vm_page_none_valid(ma[i]));
vm_page_xunbusy(ma[i]); vm_page_xunbusy(ma[i]);
}
lr = zfs_rangelock_enter(&zp->z_rangelock, lr = zfs_rangelock_enter(&zp->z_rangelock,
rounddown(start, blksz), len, RL_READER); rounddown(start, blksz), len, RL_READER);