aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-10-09 16:48:57 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-10-09 16:48:57 +0000
commit5162c5cc1ec5700a96cb5b758c4baa8e6098dd86 (patch)
treeebe7e9c0db14f78bf51e4bfe33fa4d18126e399e /sys/nfsclient
parent2815c1fd8056f6da5c73b358f5e09dcdad74b86c (diff)
downloadsrc-5162c5cc1ec5700a96cb5b758c4baa8e6098dd86.tar.gz
src-5162c5cc1ec5700a96cb5b758c4baa8e6098dd86.zip
Use crhold() instead of crdup() since we aren't modifying the cred but
just need to ensure it remains immutable.
Notes
Notes: svn path=/head/; revision=84726
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_vnops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index 60a1cc9beb5c..ed571434a4a9 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -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);