diff options
author | alc <alc@FreeBSD.org> | 2002-08-04 06:27:37 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-08-04 06:27:37 +0000 |
commit | 1d175a3d83ed45907fa4cffdd4a05c7a9cc97155 (patch) | |
tree | fc3251e2a87a06af0a916e661f61a74854c25e71 /sys/kern | |
parent | 4d5c4f2b17007ebfedcd878a69f552e065a97f65 (diff) | |
download | FreeBSD-src-1d175a3d83ed45907fa4cffdd4a05c7a9cc97155.zip FreeBSD-src-1d175a3d83ed45907fa4cffdd4a05c7a9cc97155.tar.gz |
o Convert a vm_page_sleep_busy() into a vm_page_sleep_if_busy()
with appropriate page queue locking.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_subr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index addea42..ee38f2d 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); |