git: 2001bef84ba6 - main - vm: Eliminate unnecessary lock asserts

From: Alan Cox <alc_at_FreeBSD.org>
Date: Sun, 27 Oct 2024 19:07:21 UTC
The branch main has been updated by alc:

URL: https://cgit.FreeBSD.org/src/commit/?id=2001bef84ba64cee51abf91b5ad3aca071e75788

commit 2001bef84ba64cee51abf91b5ad3aca071e75788
Author:     Alan Cox <alc@FreeBSD.org>
AuthorDate: 2024-10-27 17:40:43 +0000
Commit:     Alan Cox <alc@FreeBSD.org>
CommitDate: 2024-10-27 19:03:52 +0000

    vm: Eliminate unnecessary lock asserts
    
    There is no actual need for the VM object to be locked when initializing
    a VM page iterator.
    
    Reviewed by:    dougm
    Differential Revision:  https://reviews.freebsd.org/D47298
---
 sys/vm/vm_page.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c
index 054832e3f19a..57e5684b3178 100644
--- a/sys/vm/vm_page.c
+++ b/sys/vm/vm_page.c
@@ -1715,7 +1715,6 @@ void
 vm_page_iter_init(struct pctrie_iter *pages, vm_object_t object)
 {
 
-	VM_OBJECT_ASSERT_LOCKED(object);
 	vm_radix_iter_init(pages, &object->rtree);
 }
 
@@ -1729,7 +1728,6 @@ vm_page_iter_limit_init(struct pctrie_iter *pages, vm_object_t object,
     vm_pindex_t limit)
 {
 
-	VM_OBJECT_ASSERT_LOCKED(object);
 	vm_radix_iter_limit_init(pages, &object->rtree, limit);
 }