summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2004-07-21 05:08:10 +0000
committerPeter Wemm <peter@FreeBSD.org>2004-07-21 05:08:10 +0000
commit5476633aed5b97a11d1798c992111764dec03d2b (patch)
treeea5fa5ae68880ec82aaafd8359006dee720c6879
parentfd32d93b97086acaf80526bbb55f735b35d074fb (diff)
downloadsrc-test2-5476633aed5b97a11d1798c992111764dec03d2b.tar.gz
src-test2-5476633aed5b97a11d1798c992111764dec03d2b.zip
Notes
-rw-r--r--sys/vm/vm_map.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index e5209b5cb6a9..f6ce86ce6f91 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -310,7 +310,8 @@ vmspace_free(struct vmspace *vm)
if (vm->vm_refcnt == 0)
panic("vmspace_free: attempt to free already freed vmspace");
- if (--vm->vm_refcnt == 0 && vm->vm_exitingcnt == 0)
+ --vm->vm_refcnt;
+ if (vm->vm_refcnt == 0 && vm->vm_exitingcnt == 0)
vmspace_dofree(vm);
}
@@ -334,7 +335,8 @@ vmspace_exitfree(struct proc *p)
* The last wait on the exiting child's vmspace will clean up
* the remainder of the vmspace.
*/
- if (--vm->vm_exitingcnt == 0 && vm->vm_refcnt == 0)
+ --vm->vm_exitingcnt;
+ if (vm->vm_refcnt == 0 && vm->vm_exitingcnt == 0)
vmspace_dofree(vm);
}