From owner-svn-src-head@FreeBSD.ORG Sun Nov 20 16:46:51 2011 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 08CAB1065672; Sun, 20 Nov 2011 16:46:51 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D2E848FC12; Sun, 20 Nov 2011 16:46:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pAKGkoOt000919; Sun, 20 Nov 2011 16:46:50 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAKGkoTs000916; Sun, 20 Nov 2011 16:46:50 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201111201646.pAKGkoTs000916@svn.freebsd.org> From: Rick Macklem Date: Sun, 20 Nov 2011 16:46:50 +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: r227760 - in head/sys/fs: nfs 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: Sun, 20 Nov 2011 16:46:51 -0000 Author: rmacklem Date: Sun Nov 20 16:46:50 2011 New Revision: 227760 URL: http://svn.freebsd.org/changeset/base/227760 Log: Add two arguments to the nfsrpc_rellockown() function in the NFSv4 client. This does not change the client's behaviour, but prepares the code so that nfsrpc_rellockown() can be called elsewhere in a future commit. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clrpcops.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Sun Nov 20 16:36:02 2011 (r227759) +++ head/sys/fs/nfs/nfs_var.h Sun Nov 20 16:46:50 2011 (r227760) @@ -418,8 +418,8 @@ int nfsrpc_pathconf(vnode_t, struct nfsv struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); int nfsrpc_renew(struct nfsclclient *, struct ucred *, NFSPROC_T *); -int nfsrpc_rellockown(struct nfsmount *, struct nfscllockowner *, - struct ucred *, NFSPROC_T *); +int nfsrpc_rellockown(struct nfsmount *, struct nfscllockowner *, uint8_t *, + int, struct ucred *, NFSPROC_T *); int nfsrpc_getdirpath(struct nfsmount *, u_char *, struct ucred *, NFSPROC_T *); int nfsrpc_delegreturn(struct nfscldeleg *, struct ucred *, Modified: head/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clrpcops.c Sun Nov 20 16:36:02 2011 (r227759) +++ head/sys/fs/nfsclient/nfs_clrpcops.c Sun Nov 20 16:46:50 2011 (r227760) @@ -649,7 +649,8 @@ nfsrpc_doclose(struct nfsmount *nmp, str * puts on the wire has the file handle for this file appended * to it, so it can be done now. */ - (void)nfsrpc_rellockown(nmp, lp, tcred, p); + (void)nfsrpc_rellockown(nmp, lp, lp->nfsl_open->nfso_fh, + lp->nfsl_open->nfso_fhlen, tcred, p); } /* @@ -4027,7 +4028,7 @@ nfsrpc_renew(struct nfsclclient *clp, st */ APPLESTATIC int nfsrpc_rellockown(struct nfsmount *nmp, struct nfscllockowner *lp, - struct ucred *cred, NFSPROC_T *p) + uint8_t *fh, int fhlen, struct ucred *cred, NFSPROC_T *p) { struct nfsrv_descript nfsd, *nd = &nfsd; u_int32_t *tl; @@ -4039,10 +4040,8 @@ nfsrpc_rellockown(struct nfsmount *nmp, *tl++ = nmp->nm_clp->nfsc_clientid.lval[0]; *tl = nmp->nm_clp->nfsc_clientid.lval[1]; NFSBCOPY(lp->nfsl_owner, own, NFSV4CL_LOCKNAMELEN); - NFSBCOPY(lp->nfsl_open->nfso_fh, &own[NFSV4CL_LOCKNAMELEN], - lp->nfsl_open->nfso_fhlen); - (void)nfsm_strtom(nd, own, NFSV4CL_LOCKNAMELEN + - lp->nfsl_open->nfso_fhlen); + NFSBCOPY(fh, &own[NFSV4CL_LOCKNAMELEN], fhlen); + (void)nfsm_strtom(nd, own, NFSV4CL_LOCKNAMELEN + fhlen); nd->nd_flag |= ND_USEGSSNAME; error = newnfs_request(nd, nmp, NULL, &nmp->nm_sockreq, NULL, p, cred, NFS_PROG, NFS_VER4, NULL, 1, NULL);