summaryrefslogtreecommitdiffstats
path: root/sys/ufs
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/ufs
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/ufs')
-rw-r--r--sys/ufs/ufs/ufs_vnops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c
index 3c7d401..9a04787 100644
--- a/sys/ufs/ufs/ufs_vnops.c
+++ b/sys/ufs/ufs/ufs_vnops.c
@@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$");
#include <sys/bio.h>
#include <sys/buf.h>
#include <sys/mount.h>
+#include <sys/refcount.h>
#include <sys/unistd.h>
#include <sys/vnode.h>
#include <sys/dirent.h>
@@ -1364,7 +1365,7 @@ ufs_mkdir(ap)
* XXX This seems to never be accessed out of
* our context so a stack variable is ok.
*/
- ucred.cr_ref = 1;
+ refcount_init(&ucred.cr_ref, 1);
ucred.cr_uid = ip->i_uid;
ucred.cr_ngroups = 1;
ucred.cr_groups[0] = dp->i_gid;
@@ -2195,7 +2196,7 @@ ufs_makeinode(mode, dvp, vpp, cnp)
* XXX This seems to never be accessed out of our
* context so a stack variable is ok.
*/
- ucred.cr_ref = 1;
+ refcount_init(&ucred.cr_ref, 1);
ucred.cr_uid = ip->i_uid;
ucred.cr_ngroups = 1;
ucred.cr_groups[0] = pdir->i_gid;
OpenPOWER on IntegriCloud