diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index addea42a5376..ee38f2da7f02 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -103,7 +103,9 @@ vm_pgmoveco(mapa, srcobj, kaddr, uaddr) return(EFAULT); } if ((user_pg = vm_page_lookup(uobject, upindex)) != NULL) { - vm_page_sleep_busy(user_pg, 1, "vm_pgmoveco"); + vm_page_lock_queues(); + if (!vm_page_sleep_if_busy(user_pg, 1, "vm_pgmoveco")) + vm_page_unlock_queues(); pmap_remove(map->pmap, uaddr, uaddr+PAGE_SIZE); vm_page_lock_queues(); vm_page_busy(user_pg);