Subject: Re: kern/13077
To: Love <lha@stacken.kth.se>
From: Bill Studenmund <wrstuden@zembu.com>
List: tech-kern
Date: 06/27/2001 14:08:59
On 24 Jun 2001, Love wrote:
> Love <lha@stacken.kth.se> writes:
>
> > One way around the problem might be to make vcount not vnone VXLOCKed
> > vnodes with refcount 0.
>
> That seems to do the trick, at least I can't trigger the deadlock any more.
> Now, is it the right thing ? If not, how should it be solved ?
Looks right to me. If a vnode has VXLOCK set, you don't want to call vgone
- VXLOCK got set because the vnode is already IN vgone. :-)
> Index: vfs_subr.c
> ===================================================================
> RCS file: /cvsroot/syssrc/sys/kern/vfs_subr.c,v
> retrieving revision 1.150
> diff -u -w -r1.150 vfs_subr.c
> --- vfs_subr.c 2001/06/05 04:42:05 1.150
> +++ vfs_subr.c 2001/06/24 20:35:25
> @@ -1785,7 +1785,8 @@
> /*
> * Alias, but not in use, so flush it out.
> */
> - if (vq->v_usecount == 0 && vq != vp) {
> + if (vq->v_usecount == 0 && vq != vp &&
> + (vq->v_flag & VXLOCK) == 0) {
> simple_unlock(&spechash_slock);
> vgone(vq);
> goto loop;
>