diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index ce775f8c5cb2..85ea18e59ebc 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1594,8 +1594,8 @@ swp_pager_force_pagein(vm_object_t object, vm_pindex_t pindex) vm_page_lock_queues(); vm_page_activate(m); vm_page_dirty(m); - vm_page_wakeup(m); vm_page_unlock_queues(); + vm_page_wakeup(m); vm_pager_page_unswapped(m); return; } @@ -1606,8 +1606,8 @@ swp_pager_force_pagein(vm_object_t object, vm_pindex_t pindex) vm_page_lock_queues(); vm_page_dirty(m); vm_page_dontneed(m); - vm_page_wakeup(m); vm_page_unlock_queues(); + vm_page_wakeup(m); vm_pager_page_unswapped(m); } diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 210c5bc38cd3..d62f3c769145 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -133,8 +133,8 @@ struct faultstate { static inline void release_page(struct faultstate *fs) { - vm_page_lock_queues(); vm_page_wakeup(fs->m); + vm_page_lock_queues(); vm_page_deactivate(fs->m); vm_page_unlock_queues(); fs->m = NULL; @@ -914,8 +914,8 @@ RetryFault:; } else { vm_page_activate(fs.m); } - vm_page_wakeup(fs.m); vm_page_unlock_queues(); + vm_page_wakeup(fs.m); /* * Unlock everything, and return @@ -1198,8 +1198,8 @@ vm_fault_copy_entry(dst_map, src_map, dst_entry, src_entry) * Mark it no longer busy, and put it on the active list. */ vm_page_activate(dst_m); - vm_page_wakeup(dst_m); vm_page_unlock_queues(); + vm_page_wakeup(dst_m); } VM_OBJECT_UNLOCK(dst_object); } diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 62894cbeaea3..2f90acf415a3 100644 --- a/sys/vm/vm_glue.c +++ b/sys/vm/vm_glue.c @@ -272,8 +272,8 @@ vm_imgact_hold_page(vm_object_t object, vm_ooffset_t offset) } vm_page_lock_queues(); vm_page_hold(m); - vm_page_wakeup(m); vm_page_unlock_queues(); + vm_page_wakeup(m); out: VM_OBJECT_UNLOCK(object); return (m); @@ -456,8 +456,8 @@ vm_thread_swapin(struct thread *td) ma[i] = m; vm_page_lock_queues(); vm_page_wire(m); - vm_page_wakeup(m); vm_page_unlock_queues(); + vm_page_wakeup(m); } VM_OBJECT_UNLOCK(ksobj); pmap_qenter(td->td_kstack, ma, pages); diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 86d1f12348a3..c91dc483dd65 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -403,8 +403,8 @@ kmem_malloc(map, size, flags) pmap_enter(kernel_pmap, addr + i, m, VM_PROT_ALL, 1); vm_page_lock_queues(); vm_page_flag_set(m, PG_WRITEABLE | PG_REFERENCED); - vm_page_wakeup(m); vm_page_unlock_queues(); + vm_page_wakeup(m); } VM_OBJECT_UNLOCK(kmem_object); vm_map_unlock(map);