Skip to content

Commit 0123f97

Browse files
Anthony Iliopoulosgregkh
authored andcommitted
NFSv4.1: fix mount hang after CREATE_SESSION failure
[ Upstream commit bf75ad0 ] When client initialization goes through server trunking discovery, it schedules the state manager and then sleeps waiting for nfs_client initialization completion. The state manager can fail during state recovery, and specifically in lease establishment as nfs41_init_clientid() will bail out in case of errors returned from nfs4_proc_create_session(), without ever marking the client ready. The session creation can fail for a variety of reasons e.g. during backchannel parameter negotiation, with status -EINVAL. The error status will propagate all the way to the nfs4_state_manager but the client status will not be marked, and thus the mount process will remain blocked waiting. Fix it by adding -EINVAL error handling to nfs4_state_manager(). Signed-off-by: Anthony Iliopoulos <[email protected]> Signed-off-by: Anna Schumaker <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent c627673 commit 0123f97

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/nfs/nfs4state.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,6 +2660,9 @@ static void nfs4_state_manager(struct nfs_client *clp)
26602660
case -ENETUNREACH:
26612661
nfs_mark_client_ready(clp, -EIO);
26622662
break;
2663+
case -EINVAL:
2664+
nfs_mark_client_ready(clp, status);
2665+
break;
26632666
default:
26642667
ssleep(1);
26652668
break;

0 commit comments

Comments
 (0)