Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jan 2012 01:20:48 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r229676 - in stable/8/sys/fs: nfs nfsclient
Message-ID:  <201201060120.q061KmHr065236@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Fri Jan  6 01:20:48 2012
New Revision: 229676
URL: http://svn.freebsd.org/changeset/base/229676

Log:
  MFC: r227760
  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.

Modified:
  stable/8/sys/fs/nfs/nfs_var.h
  stable/8/sys/fs/nfsclient/nfs_clrpcops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/fs/nfs/nfs_var.h
==============================================================================
--- stable/8/sys/fs/nfs/nfs_var.h	Fri Jan  6 00:56:31 2012	(r229675)
+++ stable/8/sys/fs/nfs/nfs_var.h	Fri Jan  6 01:20:48 2012	(r229676)
@@ -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: stable/8/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Fri Jan  6 00:56:31 2012	(r229675)
+++ stable/8/sys/fs/nfsclient/nfs_clrpcops.c	Fri Jan  6 01:20:48 2012	(r229676)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201060120.q061KmHr065236>