diff options
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index e593ae972567..d46a905b07ae 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -1635,11 +1635,17 @@ static int nfs4_reclaim_lease(struct nfs_client *clp) | |||
1635 | } | 1635 | } |
1636 | 1636 | ||
1637 | #ifdef CONFIG_NFS_V4_1 | 1637 | #ifdef CONFIG_NFS_V4_1 |
1638 | void nfs4_schedule_session_recovery(struct nfs4_session *session) | 1638 | void nfs4_schedule_session_recovery(struct nfs4_session *session, int err) |
1639 | { | 1639 | { |
1640 | struct nfs_client *clp = session->clp; | 1640 | struct nfs_client *clp = session->clp; |
1641 | 1641 | ||
1642 | set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); | 1642 | switch (err) { |
1643 | default: | ||
1644 | set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); | ||
1645 | break; | ||
1646 | case -NFS4ERR_CONN_NOT_BOUND_TO_SESSION: | ||
1647 | set_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state); | ||
1648 | } | ||
1643 | nfs4_schedule_lease_recovery(clp); | 1649 | nfs4_schedule_lease_recovery(clp); |
1644 | } | 1650 | } |
1645 | EXPORT_SYMBOL_GPL(nfs4_schedule_session_recovery); | 1651 | EXPORT_SYMBOL_GPL(nfs4_schedule_session_recovery); |