Author: rmacklem
Date: Thu Apr 15 23:56:05 2010
New Revision: 206690
URL: http://svn.freebsd.org/changeset/base/206690

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

Modified:
  head/sys/fs/nfsclient/nfs_clstate.c

Modified: head/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clstate.c Thu Apr 15 23:21:24 2010        
(r206689)
+++ head/sys/fs/nfsclient/nfs_clstate.c Thu Apr 15 23:56:05 2010        
(r206690)
@@ -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);
                }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to