Commit af94dca7 authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

NFSv4: Fail mounts if the lease setup times out

If the server is down when the client is trying to mount, so that the
calls to exchange_id or create_session fail, then we should allow the
mount system call to fail rather than hang and block other mount/umount
calls.
Reported-by: default avatarOleksandr Tymoshenko <ovt@google.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
parent 03e02b94
......@@ -2013,6 +2013,12 @@ static int nfs4_handle_reclaim_lease_error(struct nfs_client *clp, int status)
nfs_mark_client_ready(clp, -EPERM);
clear_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state);
return -EPERM;
case -ETIMEDOUT:
if (clp->cl_cons_state == NFS_CS_SESSION_INITING) {
nfs_mark_client_ready(clp, -EIO);
return -EIO;
}
fallthrough;
case -EACCES:
case -NFS4ERR_DELAY:
case -EAGAIN:
......
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