Author: jamie
Date: Sat Jun 13 15:35:22 2009
New Revision: 194117
URL: http://svn.freebsd.org/changeset/base/194117
Log:
Use getcredhostuuid instead of accessing the prison directly.
Approved by: bz (mentor)
Modified:
head/sys/fs/nfsclient/nfs_clstate.c
Modified: head/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clstate.c Sat Jun 13 15:00:29 2009
(r194116)
+++ head/sys/fs/nfsclient/nfs_clstate.c Sat Jun 13 15:35:22 2009
(r194117)
@@ -676,16 +676,12 @@ nfscl_getcl(vnode_t vp, struct ucred *cr
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);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"