summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-27 18:53:10 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-27 20:32:06 +0200
commitbf674c8228710fa4149df3988862dc112860df99 (patch)
treeb633781a7ddee018c4cae04ea2be58e1f7b6eee7 /fs/nfs/nfs4state.c
parentNFSv4.1: nfs4_bind_conn_to_session should drain the session (diff)
downloadlinux-bf674c8228710fa4149df3988862dc112860df99.tar.xz
linux-bf674c8228710fa4149df3988862dc112860df99.zip
NFSv4.1: Handle errors in nfs4_bind_conn_to_session
Ensure that we handle NFS4ERR_DELAY errors separately, and then let nfs4_recovery_handle_error() handle all other cases. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to '')
-rw-r--r--fs/nfs/nfs4state.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index d21ed0309601..d685fd4294fb 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1788,7 +1788,17 @@ static int nfs4_bind_conn_to_session(struct nfs_client *clp)
if (cred)
put_rpccred(cred);
clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
- return ret;
+ switch (ret) {
+ case 0:
+ break;
+ case -NFS4ERR_DELAY:
+ ssleep(1);
+ set_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
+ break;
+ default:
+ return nfs4_recovery_handle_error(clp, ret);
+ }
+ return 0;
}
#else /* CONFIG_NFS_V4_1 */
static int nfs4_reset_session(struct nfs_client *clp) { return 0; }
@@ -1858,6 +1868,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
status = nfs4_bind_conn_to_session(clp);
if (status < 0)
goto out_error;
+ continue;
}
/* First recover reboot state... */