From d974f03c6960553b7f20f643a3c81d8ed9a3c9bc Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 28 Apr 2002 06:07:54 +0000 Subject: 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. --- sys/vm/vm_glue.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sys/vm/vm_glue.c') diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c index 2adbb4ad8325..66eaa6bbf79f 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; -- cgit v1.2.3