diff options
author | jhb <jhb@FreeBSD.org> | 2005-09-27 18:09:42 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-09-27 18:09:42 +0000 |
commit | 0d152100b2df7e3e76fc69497ff1287595a74ee4 (patch) | |
tree | fc0ee62a4f574967280f1e5aedcc26c81ae2768e /sys/nfsserver/nfs_srvsubs.c | |
parent | 7a9ff8857d46212ef57afbafb0f8bc495fdd73b3 (diff) | |
download | FreeBSD-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_srvsubs.c')
-rw-r--r-- | sys/nfsserver/nfs_srvsubs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index 912b5a7..437dd63 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include <sys/vnode.h> #include <sys/namei.h> #include <sys/mbuf.h> +#include <sys/refcount.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/malloc.h> @@ -1257,7 +1258,7 @@ nfsrv_setcred(struct ucred *incred, struct ucred *outcred) NFSD_LOCK_DONTCARE(); bzero((caddr_t)outcred, sizeof (struct ucred)); - outcred->cr_ref = 1; + refcount_init(&outcred->cr_ref, 1); outcred->cr_uid = incred->cr_uid; outcred->cr_ngroups = incred->cr_ngroups; for (i = 0; i < incred->cr_ngroups; i++) |