Release text vnode in exit() rather than wait(). Occasionally

fifesystem problems could prevent the release from completing and
this could result in init being blocked indefinitely.

This was looked over by Matt ages ago.

Approved by:	dillon
This commit is contained in:
David Malone 2002-01-05 21:47:58 +00:00
parent 41f91cb492
commit ee42d0a965
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88941

View File

@ -123,9 +123,7 @@ exit1(td, rv)
struct proc *p = td->td_proc;
register struct proc *q, *nq;
register struct vmspace *vm;
#ifdef KTRACE
struct vnode *vtmp;
#endif
struct exitlist *ep;
GIANT_REQUIRED;
@ -275,6 +273,14 @@ exit1(td, rv)
vrele(vtmp);
}
#endif
/*
* Release reference to text vnode
*/
if ((vtmp = p->p_textvp) != NULL) {
p->p_textvp = NULL;
vrele(vtmp);
}
/*
* Remove proc from allproc queue and pidhash chain.
* Place onto zombproc. Unlink from parent's child list.
@ -575,12 +581,6 @@ wait1(td, uap, compat)
*/
(void)chgproccnt(p->p_ucred->cr_ruidinfo, -1, 0);
/*
* Release reference to text vnode
*/
if (p->p_textvp)
vrele(p->p_textvp);
/*
* Finally finished with old proc entry.
* Unlink it from its process group and free it.