aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4state.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r--fs/nfs/nfs4state.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 1b629cca7072..1936036f6293 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -1255,14 +1255,6 @@ void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags)
1255 nfs_expire_all_delegations(clp); 1255 nfs_expire_all_delegations(clp);
1256} 1256}
1257 1257
1258static void nfs4_session_recovery_handle_error(struct nfs_client *clp, int err)
1259{
1260 switch (err) {
1261 case -NFS4ERR_STALE_CLIENTID:
1262 set_bit(NFS4CLNT_LEASE_EXPIRED, &clp->cl_state);
1263 }
1264}
1265
1266static int nfs4_reset_session(struct nfs_client *clp) 1258static int nfs4_reset_session(struct nfs_client *clp)
1267{ 1259{
1268 struct nfs4_session *ses = clp->cl_session; 1260 struct nfs4_session *ses = clp->cl_session;
@@ -1275,14 +1267,14 @@ static int nfs4_reset_session(struct nfs_client *clp)
1275 status = nfs4_proc_destroy_session(clp->cl_session); 1267 status = nfs4_proc_destroy_session(clp->cl_session);
1276 if (status && status != -NFS4ERR_BADSESSION && 1268 if (status && status != -NFS4ERR_BADSESSION &&
1277 status != -NFS4ERR_DEADSESSION) { 1269 status != -NFS4ERR_DEADSESSION) {
1278 nfs4_session_recovery_handle_error(clp, status); 1270 status = nfs4_recovery_handle_error(clp, status);
1279 goto out; 1271 goto out;
1280 } 1272 }
1281 1273
1282 memset(clp->cl_session->sess_id.data, 0, NFS4_MAX_SESSIONID_LEN); 1274 memset(clp->cl_session->sess_id.data, 0, NFS4_MAX_SESSIONID_LEN);
1283 status = nfs4_proc_create_session(clp); 1275 status = nfs4_proc_create_session(clp);
1284 if (status) 1276 if (status)
1285 nfs4_session_recovery_handle_error(clp, status); 1277 status = nfs4_recovery_handle_error(clp, status);
1286 1278
1287out: 1279out:
1288 /* 1280 /*