]> err.no Git - linux-2.6/commitdiff
NFSv4: Retry lease recovery if it failed during a synchronous operation.
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 14 Sep 2006 18:03:14 +0000 (14:03 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 23 Sep 2006 03:25:03 +0000 (23:25 -0400)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index 7f60beb40df3213829338ef32bb6705e908ac7b6..c218cc450b9211948987622da4e03702566be5db 100644 (file)
@@ -793,10 +793,17 @@ out:
 int nfs4_recover_expired_lease(struct nfs_server *server)
 {
        struct nfs_client *clp = server->nfs_client;
+       int ret;
 
-       if (test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state))
+       for (;;) {
+               ret = nfs4_wait_clnt_recover(server->client, clp);
+               if (ret != 0)
+                       return ret;
+               if (!test_and_clear_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state))
+                       break;
                nfs4_schedule_state_recovery(clp);
-       return nfs4_wait_clnt_recover(server->client, clp);
+       }
+       return 0;
 }
 
 /*