Back out rev 1.240; it is unnecessary. In particular,

p1 == curthread, so _PHOLD(p1) will not have to block
to swap in p1.

Noticed by:	jhb
This commit is contained in:
David Schultz 2004-10-06 23:53:49 +00:00
parent 276f72c550
commit cda5aba4b9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136206

View File

@ -533,14 +533,8 @@ fork1(td, flags, pages, procp)
* 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 @@ fork1(td, flags, pages, procp)
/*
* 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);
/*