Subject: VOP_RENAME
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 09/16/2002 14:27:25
In vnode_if.src, I see
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;
};
but in ufs_rename, at the abortit: label, I see code that does
if (tdvp == tvp)
vrele(tdvp);
else
vput(tdvp);
if (tvp)
vput(tvp);
which looks to me as though (a) tvp should be WILLPUT, not WILLRELE,
and (b) the description language in vnode_if.src is too weak - there is
no keyword for "WILLPUT unless equal to this other arg, in which case
WILLRELE". (vop_remove also, to my reading, should use this
nonexistent code.) There's also no keyword for "WILLPUT unless nil",
which ISTM vop_rename should use on tvp and vnode_if.sh and
genfs_eopnotsupp_rele should be made to understand.
I conjecture that these have gone unnoticed because no filesystems use
genfs_eopnotsupp_rele for the relevant calls, so the mis-descriptions
have not actually affected anything.
Or Am I Missing Something (tm)?
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B