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:
parent
9a738c4dbe
commit
daacd5aa55
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user