Use crhold() instead of crdup() since we aren't modifying the cred but

just need to ensure it remains immutable.
This commit is contained in:
John Baldwin 2001-10-09 16:48:57 +00:00
parent 2815c1fd80
commit 5162c5cc1e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84726

View file

@ -2361,7 +2361,8 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
#endif
MALLOC(sp, struct sillyrename *, sizeof (struct sillyrename),
M_NFSREQ, M_WAITOK);
sp->s_cred = crdup(cnp->cn_cred);
crhold(cnp->cn_cred);
sp->s_cred = cnp->cn_cred;
sp->s_dvp = dvp;
VREF(dvp);