summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsclient/nfs_clstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/nfsclient/nfs_clstate.c')
-rw-r--r--sys/fs/nfsclient/nfs_clstate.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c
index e3cf76a..2295627 100644
--- a/sys/fs/nfsclient/nfs_clstate.c
+++ b/sys/fs/nfsclient/nfs_clstate.c
@@ -675,10 +675,16 @@ nfscl_getcl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
struct nfsclclient *newclp;
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;
- idlen = strlen(hostuuid);
+ pr = cred->cr_prison;
+ mtx_lock(&pr->pr_mtx);
+ strlcpy(uuid, pr->pr_uuid, sizeof uuid);
+ mtx_unlock(&pr->pr_mtx);
+ idlen = strlen(uuid);
if (idlen > 0)
idlen += sizeof (u_int64_t);
else
@@ -699,7 +705,7 @@ nfscl_getcl(vnode_t vp, struct ucred *cred, NFSPROC_T *p,
clp->nfsc_flags = NFSCLFLAGS_INITED;
clp->nfsc_clientidrev = 1;
clp->nfsc_cbident = nfscl_nextcbident();
- nfscl_fillclid(nmp->nm_clval, hostuuid, clp->nfsc_id,
+ nfscl_fillclid(nmp->nm_clval, uuid, clp->nfsc_id,
clp->nfsc_idlen);
LIST_INSERT_HEAD(&nfsclhead, clp, nfsc_list);
nmp->nm_clp = clp;
OpenPOWER on IntegriCloud