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:
jhb 2001-10-09 16:48:57 +00:00
parent 9a738c4dbe
commit daacd5aa55

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);