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/kern/vfs_export.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/kern/vfs_export.c')
-rw-r--r-- | sys/kern/vfs_export.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index d77cd82..05e0f45 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mbuf.h> #include <sys/mount.h> #include <sys/mutex.h> +#include <sys/refcount.h> #include <sys/socket.h> #include <sys/systm.h> #include <sys/vnode.h> @@ -115,7 +116,7 @@ vfs_hang_addrlist(mp, nep, argp) np->netc_anon.cr_ngroups = argp->ex_anon.cr_ngroups; bcopy(argp->ex_anon.cr_groups, np->netc_anon.cr_groups, sizeof(np->netc_anon.cr_groups)); - np->netc_anon.cr_ref = 1; + refcount_init(&np->netc_anon.cr_ref, 1); mp->mnt_flag |= MNT_DEFEXPORTED; return (0); } @@ -174,7 +175,7 @@ vfs_hang_addrlist(mp, nep, argp) np->netc_anon.cr_ngroups = argp->ex_anon.cr_ngroups; bcopy(argp->ex_anon.cr_groups, np->netc_anon.cr_groups, sizeof(np->netc_anon.cr_groups)); - np->netc_anon.cr_ref = 1; + refcount_init(&np->netc_anon.cr_ref, 1); return (0); out: free(np, M_NETADDR); |