summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorjamie <jamie@FreeBSD.org>2009-06-13 15:35:22 +0000
committerjamie <jamie@FreeBSD.org>2009-06-13 15:35:22 +0000
commitdbcc94be36eb7e16660d9d09b9885c37b7e22d1d (patch)
tree26e6e6f4548f628ffaf2409c7500690480dabd90 /sys/fs
parent4798e0772244bf3e3db06a0aeccd8648c3234d7c (diff)
downloadFreeBSD-src-dbcc94be36eb7e16660d9d09b9885c37b7e22d1d.zip
FreeBSD-src-dbcc94be36eb7e16660d9d09b9885c37b7e22d1d.tar.gz
Use getcredhostuuid instead of accessing the prison directly.
Approved by: bz (mentor)
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/nfsclient/nfs_clstate.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c
index 8cc2ce2..a564325 100644
--- a/sys/fs/nfsclient/nfs_clstate.c
+++ b/sys/fs/nfsclient/nfs_clstate.c
@@ -676,16 +676,12 @@ nfscl_getcl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
struct nfsclclient *newclp = NULL;
struct nfscllockowner *lp, *nlp;
struct nfsmount *nmp = VFSTONFS(vnode_mount(vp));
- struct prison *pr;
char uuid[HOSTUUIDLEN];
int igotlock = 0, error, trystalecnt, clidinusedelay, i;
u_int16_t idlen = 0;
if (cred != NULL) {
- pr = cred->cr_prison;
- mtx_lock(&pr->pr_mtx);
- strlcpy(uuid, pr->pr_uuid, sizeof uuid);
- mtx_unlock(&pr->pr_mtx);
+ getcredhostuuid(cred, uuid, sizeof uuid);
idlen = strlen(uuid);
if (idlen > 0)
idlen += sizeof (u_int64_t);
OpenPOWER on IntegriCloud