From faa9356f97d23655b801f77201692e6de9ae7caa Mon Sep 17 00:00:00 2001 From: Doug Moore Date: Thu, 24 Oct 2024 18:06:59 -0500 Subject: [PATCH] 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. --- sys/vm/swap_pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 3d21d42da6c3..e1795e8fd3ae 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -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 &&