On Tue, Aug 17, 2010 at 04:45:36PM +0300, Antti Kantee wrote:
> On Tue Aug 17 2010 at 15:41:11 +0200, Juergen Hannken-Illjes wrote:
> > > >         vp->v_freelisthd = NULL;
> > > >         mutex_exit(&vnode_free_list_lock);
> > > >  
> > > > -       if (vp->v_usecount != 0) {
> > > > -               /*
> > > > -                * was referenced again before we got the interlock
> > > > -                * Don't return to freelist - the holder of the last
> > > > -                * reference will destroy it.
> > > > -                */
> > > > -               mutex_exit(&vp->v_interlock);
> > > > -               mutex_enter(&vnode_free_list_lock);
> > > > -               goto retry;
> > > > -       }
> > > > +       KASSERT(vp->v_usecount == 0);
> > > 
> > > It's not obvious from your commit message what prevents it from gaining
> > > a reference after the lock is dropped.
> > 
> > The interlock is taken before the freelist lock is dropped and vnodes on
> > the free lists should never appear on other lists.
> 
> Not even the name cache?
> 
> (I can't remember off the top of my head, but IIRC there's something
> sneaky about it)

They can still appear on mount lists I think (it has been a while)..
Are these changes in diff format anywhere?

Reply via email to