Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/kern
On Tue, Aug 17, 2010 at 04:35:31PM +0300, Antti Kantee wrote:
> On Tue Aug 17 2010 at 13:17:48 +0000, Juergen Hannken-Illjes wrote:
> > Module Name: src
> > Committed By: hannken
> > Date: Tue Aug 17 13:17:48 UTC 2010
> >
> > Modified Files:
> > src/sys/kern: vfs_subr.c
> >
> > Log Message:
> > Now that ffs on disk inodes get freed in the reclaim routine it is no longer
> > necessary for vget() to handle VI_INACTNOW as a special case. Remove this
> > check and its support in vrelel().
>
> Hi,
>
> I didn't fully review your changes, so just to make sure: it's still
> possible to gain a reference during inactive, right?
Yes.
> > Getting another reference while the freelist is locked is an error. Replace
> > the check with a KASSERT.
> >
>
> > 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.
--
Juergen Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig
(Germany)
Home |
Main Index |
Thread Index |
Old Index