From 2e160dee97a4badbc318561f76ea56451c916d2f Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Sun, 28 Feb 2021 03:23:09 +0200 Subject: Fix assert in FreeBSD-specific dmu_read_pages The function has three similar pieces of code: for read-behind pages, requested pages and read-ahead pages. All three pieces had an assert to ensure that the page is not mapped. Later the assert was relaxed to require that the page is not mapped for writing. But that was done in two places out of three. This change fixes the third piece, read-ahead. Reviewed-by: Ryan Moeller Reviewed-by: Brian Behlendorf Signed-off-by: Andriy Gapon Closes #11654 --- module/os/freebsd/zfs/dmu_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/os') diff --git a/module/os/freebsd/zfs/dmu_os.c b/module/os/freebsd/zfs/dmu_os.c index 8e412d9c1..fb8f56031 100644 --- a/module/os/freebsd/zfs/dmu_os.c +++ b/module/os/freebsd/zfs/dmu_os.c @@ -319,7 +319,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count, break; } ASSERT(m->dirty == 0); - ASSERT(!pmap_page_is_mapped(m)); + ASSERT(!pmap_page_is_write_mapped(m)); ASSERT(db->db_size > PAGE_SIZE); bufoff = IDX_TO_OFF(m->pindex) % db->db_size; -- cgit v1.2.3