Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Anthony Iliopoulos and committed by
Anna Schumaker
bf75ad09 19151235

+3
+3
fs/nfs/nfs4state.c
··· 2744 2744 case -ENETUNREACH: 2745 2745 nfs_mark_client_ready(clp, -EIO); 2746 2746 break; 2747 + case -EINVAL: 2748 + nfs_mark_client_ready(clp, status); 2749 + break; 2747 2750 default: 2748 2751 ssleep(1); 2749 2752 break;