提交 6b30954e 编写于 作者: T Trond Myklebust

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

Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册