summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver/nfs_srvsock.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-09-27 18:09:42 +0000
committerjhb <jhb@FreeBSD.org>2005-09-27 18:09:42 +0000
commit0d152100b2df7e3e76fc69497ff1287595a74ee4 (patch)
treefc0ee62a4f574967280f1e5aedcc26c81ae2768e /sys/nfsserver/nfs_srvsock.c
parent7a9ff8857d46212ef57afbafb0f8bc495fdd73b3 (diff)
downloadFreeBSD-src-0d152100b2df7e3e76fc69497ff1287595a74ee4.zip
FreeBSD-src-0d152100b2df7e3e76fc69497ff1287595a74ee4.tar.gz
Use the refcount API to manage the reference count for user credentials
rather than using pool mutexes. Tested on: i386, alpha, sparc64
Diffstat (limited to 'sys/nfsserver/nfs_srvsock.c')
-rw-r--r--sys/nfsserver/nfs_srvsock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/nfsserver/nfs_srvsock.c b/sys/nfsserver/nfs_srvsock.c
index 22c7feb..55eeb0a 100644
--- a/sys/nfsserver/nfs_srvsock.c
+++ b/sys/nfsserver/nfs_srvsock.c
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
#include <sys/mutex.h>
#include <sys/proc.h>
#include <sys/protosw.h>
+#include <sys/refcount.h>
#include <sys/signalvar.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
@@ -364,12 +365,11 @@ nfs_getreq(struct nfsrv_descript *nd, struct nfsd *nfsd, int has_header)
/*
* XXX: This credential should be managed using crget(9)
* and related calls. Right now, this tramples on any
- * extensible data in the ucred, fails to initialize the
- * mutex, and worse. This must be fixed before FreeBSD
- * 5.3-RELEASE.
+ * extensible data in the ucred, and worse. This wasn't
+ * fixed before FreeBSD 5.3-RELEASE.
*/
bzero((caddr_t)&nd->nd_cr, sizeof (struct ucred));
- nd->nd_cr.cr_ref = 1;
+ refcount_init(&nd->nd_cr.cr_ref, 1);
nd->nd_cr.cr_uid = fxdr_unsigned(uid_t, *tl++);
nd->nd_cr.cr_gid = fxdr_unsigned(gid_t, *tl++);
len = fxdr_unsigned(int, *tl);
OpenPOWER on IntegriCloud