On Thu, Jan 29, 2009 at 08:15:23PM +0200, Kostik Belousov wrote:
> On Thu, Jan 29, 2009 at 12:09:13PM -0500, John Baldwin wrote:
> > On Thursday 29 January 2009 11:47:15 am Edward Tomasz Napierala wrote:
> > > Author: trasz
> > > Date: Thu Jan 29 16:47:15 2009
> > > New Revision: 187894
> > > URL: http://svn.freebsd.org/changeset/base/187894
> > > 
> > > Log:
> > >   Make sure the cdev doesn't go away while the filesystem is still 
> > > mounted.
> > >   Otherwise dev2udev() could return garbage.
> > >   
> > >   Reviewed by:    kib
> > >   Approved by:    rwatson (mentor)
> > >   Sponsored by:   FreeBSD Foundation
> > 
> > Is this applicable to all filesystems?  I'm curious why the VREF() on the 
> > vnode associated with the cdev entry (um_devvp) is not sufficient to 
> > prevent 
> > this?  I would have thought that the vnode would have held a reference on 
> > the 
> > cdev.
> 
> The point of this commit is that devvp vnode may be reclaimed.

And, in fact, it may be clearer to get the ref while devvp is still locked.
I do not think that this is important because mount would fail immediately
later when it tries to read from device, but still.

Attachment: pgpvOgVESBqvN.pgp
Description: PGP signature

Reply via email to