Subject: Re: vop_symlink and unused vpp?
To: Assar Westerlund <assar@netbsd.org>
From: Bill Studenmund <wrstuden@zembu.com>
List: tech-kern
Date: 07/19/2001 15:42:40
On 19 Jul 2001, Assar Westerlund wrote:

> Bill Studenmund <wrstuden@zembu.com> writes:
> > As a tie breaker, what does FreeBSD do?
> 
> FreeBSD actually always returned the (not-refed) node.

Are you sure? Looking at their source on CVSWeb, I see in vnode_if.src:

#
#% mknod        dvp     L L L
#% mknod        vpp     - X -
#
vop_mknod {
        IN struct vnode *dvp;
        OUT struct vnode **vpp;
        IN struct componentname *cnp;
        IN struct vattr *vap;
};

and

#
#% symlink      dvp     L L L
#% symlink      vpp     - U -
#
vop_symlink {
        IN struct vnode *dvp;
        OUT struct vnode **vpp;
        IN struct componentname *cnp;
        IN struct vattr *vap;
        IN char *target;
};

X means return the vnode locked if not NULL.

Or does the code not match the descriptions above...

(I ask as I thought they'd gotten rid of all of the WILLRELE's).

> > My instinct is we probably should return the node always.
> 
> Yes, it seems simpler always doing that.  And it will probably make
> layer (or whoever is going to debug that) happier too.  I'll send a
> patch that implements my original proposed choice c) tomorrow, after I
> have gotten some sleep.

Sounds good.

Take care,

Bill