From 0e46085ee6c8eee08bd1277c652ef4ca8e260f8d Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 4 Dec 2024 14:24:50 -0500 Subject: [PATCH] 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 Reviewed-by: Brian Behlendorf Reviewed-by: Brian Atkinson Reported-by: Peter Holm Signed-off-by: Mark Johnston Sponsored-by: Klara, Inc. Closes #16810 Closes #16834 --- module/os/freebsd/zfs/zfs_vnops_os.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c index d5547c0a9..b8c2c341d 100644 --- a/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/module/os/freebsd/zfs/zfs_vnops_os.c @@ -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 * the best we can do for now. */ - for (int i = 0; i < count; i++) { - ASSERT(vm_page_none_valid(ma[i])); + for (int i = 0; i < count; i++) vm_page_xunbusy(ma[i]); - } lr = zfs_rangelock_enter(&zp->z_rangelock, rounddown(start, blksz), len, RL_READER);