summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_glue.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-04-28 06:07:54 +0000
committeralc <alc@FreeBSD.org>2002-04-28 06:07:54 +0000
commitdc5b6882d314d270e5a57ba165792772e0ec4da7 (patch)
treecfed2f78df18ec91b4eea400ce4de416ed94a583 /sys/vm/vm_glue.c
parent1fc70fcb7789be34cae6201ab9c71fc4c9945e60 (diff)
downloadFreeBSD-src-dc5b6882d314d270e5a57ba165792772e0ec4da7.zip
FreeBSD-src-dc5b6882d314d270e5a57ba165792772e0ec4da7.tar.gz
o Introduce and use vm_map_trylock() to replace several direct uses
of lockmgr(). o Add missing synchronization to vmspace_swap_count(): Obtain a read lock on the vm_map before traversing it.
Diffstat (limited to 'sys/vm/vm_glue.c')
-rw-r--r--sys/vm/vm_glue.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index 2adbb4a..66eaa6b 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -560,9 +560,7 @@ retry:
* data structures there is a
* possible deadlock.
*/
- if (lockmgr(&vm->vm_map.lock,
- LK_EXCLUSIVE | LK_NOWAIT,
- NULL, curthread)) {
+ if (!vm_map_trylock(&vm->vm_map)) {
vmspace_free(vm);
PROC_UNLOCK(p);
goto nextproc;
OpenPOWER on IntegriCloud