summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_vnops.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-10-11 23:38:17 +0000
committerjhb <jhb@FreeBSD.org>2001-10-11 23:38:17 +0000
commit4806d88677d2a333254f9fc33d4e119cc56bb002 (patch)
treed3ca87a8ac917d5003235cc737cd5f76591f7c1b /sys/nfsclient/nfs_vnops.c
parent9f68054d87b5538c76f0b802ef8f7344eedd5647 (diff)
downloadFreeBSD-src-4806d88677d2a333254f9fc33d4e119cc56bb002.zip
FreeBSD-src-4806d88677d2a333254f9fc33d4e119cc56bb002.tar.gz
Change the kernel's ucred API as follows:
- crhold() returns a reference to the ucred whose refcount it bumps. - crcopy() now simply copies the credentials from one credential to another and has no return value. - a new crshared() primitive is added which returns true if a ucred's refcount is > 1 and false (0) otherwise.
Diffstat (limited to 'sys/nfsclient/nfs_vnops.c')
-rw-r--r--sys/nfsclient/nfs_vnops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index ed57143..fdb0fca 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -2361,8 +2361,7 @@ nfs_sillyrename(struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
#endif
MALLOC(sp, struct sillyrename *, sizeof (struct sillyrename),
M_NFSREQ, M_WAITOK);
- crhold(cnp->cn_cred);
- sp->s_cred = cnp->cn_cred;
+ sp->s_cred = crhold(cnp->cn_cred);
sp->s_dvp = dvp;
VREF(dvp);
OpenPOWER on IntegriCloud