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 <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Andriy Gapon <avg@FreeBSD.org>
Closes #11654
This commit is contained in:
Andriy Gapon 2021-02-28 03:23:09 +02:00 committed by Brian Behlendorf
parent 6c1989923e
commit ccb453acd0
1 changed files with 1 additions and 1 deletions

View File

@ -319,7 +319,7 @@ dmu_read_pages(objset_t *os, uint64_t object, vm_page_t *ma, int count,
break; break;
} }
ASSERT(m->dirty == 0); ASSERT(m->dirty == 0);
ASSERT(!pmap_page_is_mapped(m)); ASSERT(!pmap_page_is_write_mapped(m));
ASSERT(db->db_size > PAGE_SIZE); ASSERT(db->db_size > PAGE_SIZE);
bufoff = IDX_TO_OFF(m->pindex) % db->db_size; bufoff = IDX_TO_OFF(m->pindex) % db->db_size;