summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schultz <das@FreeBSD.org>2004-10-06 23:53:49 +0000
committerDavid Schultz <das@FreeBSD.org>2004-10-06 23:53:49 +0000
commitcda5aba4b95d03da581baa1128cb0807c7c1b7a7 (patch)
tree47455bac5fc5aa92fd87543a6bd6cacb0f7eb606
parent276f72c550c0faf0cbfd5fa737c4d5d452a38b35 (diff)
Notes
-rw-r--r--sys/kern/kern_fork.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 6e47e26bd6ca..714a1af63b59 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -533,14 +533,8 @@ again:
* p_limit is copy-on-write. Bump its refcount.
*/
p2->p_limit = lim_hold(p1->p_limit);
-
- /*
- * We don't need to prevent the parent from being swapped out just yet,
- * but this is a convenient point to block to swap it in if needed.
- */
- PROC_UNLOCK(p2);
- _PHOLD(p1);
PROC_UNLOCK(p1);
+ PROC_UNLOCK(p2);
/* Bump references to the text vnode (for procfs) */
if (p2->p_textvp)
@@ -635,8 +629,9 @@ again:
/*
* This begins the section where we must prevent the parent
- * from being swapped. We already got a hold on the parent earlier.
+ * from being swapped.
*/
+ _PHOLD(p1);
PROC_UNLOCK(p1);
/*