Subject: Re: vput vs vrele in vnodeops
To: Bill Stouder-Studenmund <wrstuden@netbsd.org>
From: Antti Kantee <pooka@cs.hut.fi>
List: tech-kern
Date: 04/07/2007 13:55:39
On Fri Apr 06 2007 at 18:00:47 -0700, Bill Stouder-Studenmund wrote:
> > so I would think that the vnop implementation should do VOP_UNLOCK on
> > dvp. But the coda coda does vput, and puffs does too.
> >
> > I expected that the caller of VOP_CREATE would hold a ref, and that
> > VOP_CREATE would ride that ref, so it seems odd to release it.
> >
> > What's the right behavior, and should vnodeops(9) be fixed?
>
> Look in vnode_if.src. Unfortunately vnodeops(9) has been wrong since day
> 1.
Technically it is correct, the node *is* unlocked ;)
Yes, vnodeops(9) should be fixed. But maybe it should be fixed by
writing a common paragraph for all the operations which create a node
(create, mkdir, mknod, symlink) and putting a "see also" reference to
that paragraph in the description of each respective op. Looks like
they already have copypasted duplicates for the bit about PNBUF_PUT.
--
Antti Kantee <pooka@iki.fi> Of course he runs NetBSD
http://www.iki.fi/pooka/ http://www.NetBSD.org/
"la qualité la plus indispensable du cuisinier est l'exactitude"