Subject: Re: CVS commit: src/sys/fs/ntfs
To: Jaromir Dolecek <jdolecek@netbsd.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 04/10/2003 13:07:57
On Thu, 10 Apr 2003, Jaromir Dolecek wrote:

> Bill Studenmund wrote:
> > No. From vnode.src:
> >
> > vop_rename {
> >         IN WILLRELE struct vnode *fdvp;
> >         IN WILLRELE struct vnode *fvp;
> >         IN struct componentname *fcnp;
> >         IN WILLPUT struct vnode *tdvp;
> >         IN WILLRELE struct vnode *tvp;
> >         IN struct componentname *tcnp;
> > };
> >
> > rename only has one WILLPUT, so we don't have to worry about a
> > dual-vput(). Or at least that was my thinking. :-)
>
> Hmm, true. But current ntfs_rename(), and ufs_rename() which was
> source of the info, has
>
> 	if (ap->a_tvp)
> 		vput(ap->a_tvp);
>
> so tvp should actually be WILLPUT, or ufs_vnops.c is wrong :)
>
> And it's necessary to add a check against NULL vp in either case.

Yeah, add the NULL test, and change vnode.src to WILLPUT in that case.

Take care,

Bill