diff options
author | John Baldwin <jhb@FreeBSD.org> | 2005-09-27 18:09:42 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2005-09-27 18:09:42 +0000 |
commit | 7e9e371f2d9787ff777f1198dc92921000434359 (patch) | |
tree | fc0ee62a4f574967280f1e5aedcc26c81ae2768e /sys/kern/vfs_export.c | |
parent | b2149bde1f1bab65167cb33be2a5827130f392f7 (diff) | |
download | src-7e9e371f2d9787ff777f1198dc92921000434359.tar.gz src-7e9e371f2d9787ff777f1198dc92921000434359.zip |
Use the refcount API to manage the reference count for user credentials
rather than using pool mutexes.
Tested on: i386, alpha, sparc64
Notes
Notes:
svn path=/head/; revision=150634
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 d77cd82f85f0..05e0f45d0f3d 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); |