diff options
author | peter <peter@FreeBSD.org> | 2004-07-21 05:08:10 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2004-07-21 05:08:10 +0000 |
commit | ddbadf82fe0f3f9023613be15d55e6b498c23f93 (patch) | |
tree | ea5fa5ae68880ec82aaafd8359006dee720c6879 /sys | |
parent | f77d7b9449be99051fccac83314a8f288e1e83ec (diff) | |
download | FreeBSD-src-ddbadf82fe0f3f9023613be15d55e6b498c23f93.zip FreeBSD-src-ddbadf82fe0f3f9023613be15d55e6b498c23f93.tar.gz |
Semi-gratuitous change. Move two refcount operations to their own lines
rather than be buried inside an if (expression). And now that the if
expression is the same in both exit paths, use the same ordering.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_map.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index e5209b5..f6ce86c 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); } |