mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 00:21:59 +00:00
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: Oleksandr Tymoshenko <ovt@google.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
This commit is contained in:
parent
03e02b9417
commit
af94dca79b
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user