o Convert a vm_page_sleep_busy() into a vm_page_sleep_if_busy()

with appropriate page queue locking.
This commit is contained in:
Alan Cox 2002-08-04 06:27:37 +00:00
parent 9e0e832f14
commit 4453ada654

View File

@ -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);