svn commit: r229674 - in stable/9/sys/fs: nfs nfsclient

Rick Macklem rmacklem at FreeBSD.org
Fri Jan 6 00:42:33 UTC 2012


Author: rmacklem
Date: Fri Jan  6 00:42:32 2012
New Revision: 229674
URL: http://svn.freebsd.org/changeset/base/229674

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/9/sys/fs/nfs/nfs_var.h
  stable/9/sys/fs/nfsclient/nfs_clrpcops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/fs/nfs/nfs_var.h
==============================================================================
--- stable/9/sys/fs/nfs/nfs_var.h	Fri Jan  6 00:34:27 2012	(r229673)
+++ stable/9/sys/fs/nfs/nfs_var.h	Fri Jan  6 00:42:32 2012	(r229674)
@@ -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/9/sys/fs/nfsclient/nfs_clrpcops.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clrpcops.c	Fri Jan  6 00:34:27 2012	(r229673)
+++ stable/9/sys/fs/nfsclient/nfs_clrpcops.c	Fri Jan  6 00:42:32 2012	(r229674)
@@ -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);


More information about the svn-src-stable-9 mailing list