tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: More duplicate code, vnode locking question



On Wed Apr 22 2009 at 23:45:01 +0300, Elad Efrat wrote:
> >> Also, it seems that some file-systems call VOP_OPEN() without devvp
> >> being locked. Compare, for example, ffs_mount() and efs_mount(). Is
> >> this possible, or am I missing something? :)
> >
> > This is a bug.
> 
> Okay. Unless someone beats me to it, once I'm done with some other stuff
> I'll go over the file-systems and make a patch to add locking where it's
> missing (in this regard only! :) and post it.
> 
> What I have in mind is adding vn_lock() before the VOP_OPEN() call, and
> adjust error paths to vput() where the vnode is locked and vrele()
> otherwise. Is this correct?

I already explained why locking it is a bug also.  Why are you replacing
a bug with a theoretically more severe bug?  Did you disagree with
my explanation?


Home | Main Index | Thread Index | Old Index