Minor bug fix in resource.c
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 2 Mar 2011 19:11:15 +0000 (11:11 -0800)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:35:59 +0000 (17:35 -0700)
Only affects a few commits.

kern/src/resource.c

index 48a83d9..96c02bc 100644 (file)
@@ -47,8 +47,8 @@ ssize_t core_request(struct proc *p)
        assert(current_tf);
        spin_lock(&p->proc_lock);
        if (p->state == PROC_DYING) {
-               return -EFAIL;
                spin_unlock(&p->proc_lock);
+               return -EFAIL;
        }
        /* check to see if this is a full deallocation.  for cores, it's a
         * transition from _M to _S.  Will be issues with handling this async. */