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 09:45:24
On Thu, 10 Apr 2003, Jaromir Dolecek wrote:

> Bill Studenmund wrote:
> > > Mind if I'd do just that?
> >
> > Go for it.
>
> BTW, does this handle correctly the vp == dvp case, where
> we need to do vrele()+vput() instead of vput()+vput()?

No, it doesn't.

Only VOP_REMOVE and VOP_RDMIR need to worry about this, and it should be
easy to fix.

I think the easy way is to add a new vnode pointer, *vp_last = NULL;
Then in the VDESC_VP0_WILLPUT case, we do:

	case VDESC_VP0_WILLPUT:
		/* Check for dvp == vp cases */
		if (vp == vp_last)
			vrele(vp);
		else
			vput(vp);
		vp_last = vp;
		break;

Take care,

Bill