diff options
author | jhb <jhb@FreeBSD.org> | 2001-05-11 23:50:08 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-05-11 23:50:08 +0000 |
commit | c20ad9aee20025e5e02cc318f355e6866e04bef1 (patch) | |
tree | bc6fd1892ca4ffcf8937beab0e366b979b5c8a37 /sys/ia64 | |
parent | bba3cec519b0df520da69e77e569c12fad190810 (diff) | |
download | FreeBSD-src-c20ad9aee20025e5e02cc318f355e6866e04bef1.zip FreeBSD-src-c20ad9aee20025e5e02cc318f355e6866e04bef1.tar.gz |
Simplify the vm fault trap handling code a bit by using if-else instead of
duplicating code in the then case and then using a goto to jump around
the else case.
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/trap.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/ia64/ia64/trap.c b/sys/ia64/ia64/trap.c index 8f9b258..3582dd2 100644 --- a/sys/ia64/ia64/trap.c +++ b/sys/ia64/ia64/trap.c @@ -396,17 +396,11 @@ trap(int vector, int imm, struct trapframe *framep) * a growable stack region, or if the stack * growth succeeded. */ - if (!grow_stack (p, va)) { + if (!grow_stack (p, va)) rv = KERN_FAILURE; - PROC_LOCK(p); - --p->p_lock; - PROC_UNLOCK(p); - goto nogo; - } - - - /* Fault in the user page: */ - rv = vm_fault(map, va, ftype, + else + /* Fault in the user page: */ + rv = vm_fault(map, va, ftype, (ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY : VM_FAULT_NORMAL); @@ -422,7 +416,6 @@ trap(int vector, int imm, struct trapframe *framep) rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL); } - nogo:; /* * If this was a stack access we keep track of the * maximum accessed stack size. Also, if vm_fault |