summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Iliopoulos <ailiop@suse.com>2025-08-13 11:00:47 +0200
committerAnna Schumaker <anna.schumaker@oracle.com>2025-09-23 13:28:19 -0400
commitbf75ad096820fee5da40e671ebb32de725a1c417 (patch)
treee521b53c21a04804b31223e7d095f3f38c6c5461
parent191512355e520dfc45c8bc3b56d4de59c3ade33e (diff)
downloadlinux-bf75ad096820fee5da40e671ebb32de725a1c417.tar.gz
linux-bf75ad096820fee5da40e671ebb32de725a1c417.tar.bz2
linux-bf75ad096820fee5da40e671ebb32de725a1c417.zip
NFSv4.1: fix mount hang after CREATE_SESSION failure
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 <ailiop@suse.com> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
-rw-r--r--fs/nfs/nfs4state.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 7612e977e80b..01179f7de322 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2744,6 +2744,9 @@ out_error:
case -ENETUNREACH:
nfs_mark_client_ready(clp, -EIO);
break;
+ case -EINVAL:
+ nfs_mark_client_ready(clp, status);
+ break;
default:
ssleep(1);
break;