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:
parent
49c162fb20
commit
f974b4f783
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user