swap_pager: fix seek_hole assert

Moving code from tmpfs to swap_pager introduced another WLOCKED object
assert that should have been an RLOCKED object assert.  Fix it.
This commit is contained in:
Doug Moore 2024-10-24 18:06:59 -05:00
parent 02e85d1c8a
commit faa9356f97

View File

@ -2524,7 +2524,7 @@ swap_pager_seek_hole(vm_object_t object, vm_pindex_t pindex)
struct swblk *sb;
vm_page_t m;
VM_OBJECT_ASSERT_WLOCKED(object);
VM_OBJECT_ASSERT_RLOCKED(object);
vm_page_iter_init(&pages, object);
swblk_iter_init_only(&blks, object);
while (((m = vm_page_iter_lookup(&pages, pindex)) != NULL &&