summaryrefslogtreecommitdiff
path: root/sys/kern/kern_subr.c
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2002-08-04 06:27:37 +0000
committerAlan Cox <alc@FreeBSD.org>2002-08-04 06:27:37 +0000
commit4453ada654e3a3eda00b3b506617d046d24da932 (patch)
treefc3251e2a87a06af0a916e661f61a74854c25e71 /sys/kern/kern_subr.c
parent9e0e832f144e0a1332c11f110ed438e1fdc70942 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r--sys/kern/kern_subr.c4
1 files changed, 3 insertions, 1 deletions
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);