Skip to content

Commit 0e020bf

Browse files
authored
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Brian Atkinson <[email protected]> Reported-by: Peter Holm <[email protected]> Signed-off-by: Mark Johnston <[email protected]> Sponsored-by: Klara, Inc. Closes #16810 Closes #16834
1 parent 4b4e346 commit 0e020bf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

module/os/freebsd/zfs/zfs_vnops_os.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3960,10 +3960,8 @@ zfs_getpages(struct vnode *vp, vm_page_t *ma, int count, int *rbehind,
39603960
* to the page fault handler's OOM logic, but this is
39613961
* the best we can do for now.
39623962
*/
3963-
for (int i = 0; i < count; i++) {
3964-
ASSERT(vm_page_none_valid(ma[i]));
3963+
for (int i = 0; i < count; i++)
39653964
vm_page_xunbusy(ma[i]);
3966-
}
39673965

39683966
lr = zfs_rangelock_enter(&zp->z_rangelock,
39693967
rounddown(start, blksz), len, RL_READER);

0 commit comments

Comments
 (0)