Commit 6b30954e authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Retry lease recovery if it failed during a synchronous operation.

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 97db8f41
......@@ -793,10 +793,17 @@ static int _nfs4_do_access(struct inode *inode, struct rpc_cred *cred, int openf
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;
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment