svn commit: r207086 - stable/8/sys/fs/nfsclient

Rick Macklem rmacklem at FreeBSD.org
Fri Apr 23 00:35:00 UTC 2010


Author: rmacklem
Date: Fri Apr 23 00:34:59 2010
New Revision: 207086
URL: http://svn.freebsd.org/changeset/base/207086

Log:
  MFC: r206690
  Add mutex lock calls to 2 cases in the experimental NFS client's
  renew thread where they were missing.

Modified:
  stable/8/sys/fs/nfsclient/nfs_clstate.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)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/geom/sched/   (props changed)

Modified: stable/8/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- stable/8/sys/fs/nfsclient/nfs_clstate.c	Fri Apr 23 00:12:23 2010	(r207085)
+++ stable/8/sys/fs/nfsclient/nfs_clstate.c	Fri Apr 23 00:34:59 2010	(r207086)
@@ -2318,7 +2318,9 @@ nfscl_renewthread(struct nfsclclient *cl
 	int error, cbpathdown, islept, igotlock, ret, clearok;
 
 	cred = newnfs_getcred();
+	NFSLOCKCLSTATE();
 	clp->nfsc_flags |= NFSCLFLAGS_HASTHREAD;
+	NFSUNLOCKCLSTATE();
 	for(;;) {
 		newnfs_setroot(cred);
 		cbpathdown = 0;
@@ -2331,9 +2333,11 @@ nfscl_renewthread(struct nfsclclient *cl
 			error = nfsrpc_renew(clp, cred, p);
 			if (error == NFSERR_CBPATHDOWN)
 			    cbpathdown = 1;
-			else if (error == NFSERR_STALECLIENTID)
+			else if (error == NFSERR_STALECLIENTID) {
+			    NFSLOCKCLSTATE();
 			    clp->nfsc_flags |= NFSCLFLAGS_RECOVER;
-			else if (error == NFSERR_EXPIRED)
+			    NFSUNLOCKCLSTATE();
+			} else if (error == NFSERR_EXPIRED)
 			    (void) nfscl_hasexpired(clp, clidrev, p);
 		}
 


More information about the svn-src-all mailing list