diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index bfea8bc2b48e..154b6e03ab4f 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -125,9 +125,7 @@ vm_pgmoveco(mapa, srcobj, kaddr, uaddr) } kpindex = kern_pg->pindex; vm_page_busy(kern_pg); - vm_page_unlock_queues(); vm_page_rename(kern_pg, uobject, upindex); - vm_page_lock_queues(); vm_page_flag_clear(kern_pg, PG_BUSY); kern_pg->valid = VM_PAGE_BITS_ALL; vm_page_unlock_queues(); diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 4d1499a9264b..79d462554621 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -704,7 +704,6 @@ readrest: vm_page_lock_queues(); pmap_remove_all(fs.first_m); vm_page_free(fs.first_m); - vm_page_unlock_queues(); fs.first_m = NULL; /* @@ -714,7 +713,6 @@ readrest: */ vm_page_rename(fs.m, fs.first_object, fs.first_pindex); fs.first_m = fs.m; - vm_page_lock_queues(); vm_page_busy(fs.first_m); vm_page_unlock_queues(); fs.m = NULL; diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index d9cd47fb2026..5ccf4a6baba8 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1245,10 +1245,8 @@ vm_object_split(vm_map_entry_t entry) goto retry; vm_page_busy(m); - vm_page_unlock_queues(); vm_page_rename(m, new_object, idx); /* page automatically made dirty by rename and cache handled */ - vm_page_lock_queues(); vm_page_busy(m); vm_page_unlock_queues(); } @@ -1455,7 +1453,9 @@ vm_object_backing_scan(vm_object_t object, int op) * If the page was mapped to a process, it can remain * mapped through the rename. */ + vm_page_lock_queues(); vm_page_rename(p, object, new_pindex); + vm_page_unlock_queues(); /* page automatically made dirty by rename */ } p = next; diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index a1520e28b41d..71d56c580e63 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -682,13 +682,11 @@ vm_page_rename(vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) int s; s = splvm(); - vm_page_lock_queues(); vm_page_remove(m); vm_page_insert(m, new_object, new_pindex); if (m->queue - m->pc == PQ_CACHE) vm_page_deactivate(m); vm_page_dirty(m); - vm_page_unlock_queues(); splx(s); }