From: Trond Myklebust Date: Thu, 14 Sep 2006 18:03:14 +0000 (-0400) Subject: NFSv4: Retry lease recovery if it failed during a synchronous operation. X-Git-Tag: v2.6.19-rc1~1271^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b30954ebb569fa1b2abdb21f2f4290eec76bf80;p=linux-2.6 NFSv4: Retry lease recovery if it failed during a synchronous operation. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 7f60beb40d..c218cc450b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -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; } /*