diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2004-03-08 00:32:34 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2004-03-08 00:32:34 +0000 |
| commit | a69d88af529d7c3de54a087cb1059a83cd0d20bb (patch) | |
| tree | 625080582047b5a5afc45ce13753bac4859d09b1 | |
| parent | b8f8da5d9005c05192c59a88aa7cd0751688f1e1 (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_fork.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 1c39c424bd7a5..34a1bfd64ac25 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -474,7 +474,6 @@ again: if (pages != 0) vm_thread_new_altkstack(td2, pages); - mtx_lock(&Giant); /* XXX: for VREF() */ PROC_LOCK(p2); PROC_LOCK(p1); @@ -537,11 +536,7 @@ again: else p2->p_sigparent = SIGCHLD; - /* Bump references to the text vnode (for procfs) */ p2->p_textvp = p1->p_textvp; - if (p2->p_textvp) - VREF(p2->p_textvp); - mtx_unlock(&Giant); /* XXX: for VREF() */ p2->p_fd = fd; p2->p_fdtol = fdtol; @@ -552,6 +547,10 @@ again: PROC_UNLOCK(p1); PROC_UNLOCK(p2); + /* Bump references to the text vnode (for procfs) */ + if (p2->p_textvp) + vref(p2->p_textvp); + /* * Set up linkage for kernel based threading. */ |
