From owner-svn-src-head@FreeBSD.ORG Sat Jun 13 15:35:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47A2310656C0; Sat, 13 Jun 2009 15:35:23 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 359998FC1D; Sat, 13 Jun 2009 15:35:23 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5DFZNc8017848; Sat, 13 Jun 2009 15:35:23 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5DFZNnu017847; Sat, 13 Jun 2009 15:35:23 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200906131535.n5DFZNnu017847@svn.freebsd.org> From: Jamie Gritton Date: Sat, 13 Jun 2009 15:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194117 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jun 2009 15:35:23 -0000 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);