diff options
Diffstat (limited to 'fs/nfs/nfs4state.c')
-rw-r--r-- | fs/nfs/nfs4state.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 9448c579d41a..e61f68d5ef21 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -136,16 +136,11 @@ int nfs40_discover_server_trunking(struct nfs_client *clp, | |||
136 | clp->cl_confirm = clid.confirm; | 136 | clp->cl_confirm = clid.confirm; |
137 | 137 | ||
138 | status = nfs40_walk_client_list(clp, result, cred); | 138 | status = nfs40_walk_client_list(clp, result, cred); |
139 | switch (status) { | 139 | if (status == 0) { |
140 | case -NFS4ERR_STALE_CLIENTID: | ||
141 | set_bit(NFS4CLNT_LEASE_CONFIRM, &clp->cl_state); | ||
142 | case 0: | ||
143 | /* Sustain the lease, even if it's empty. If the clientid4 | 140 | /* Sustain the lease, even if it's empty. If the clientid4 |
144 | * goes stale it's of no use for trunking discovery. */ | 141 | * goes stale it's of no use for trunking discovery. */ |
145 | nfs4_schedule_state_renewal(*result); | 142 | nfs4_schedule_state_renewal(*result); |
146 | break; | ||
147 | } | 143 | } |
148 | |||
149 | out: | 144 | out: |
150 | return status; | 145 | return status; |
151 | } | 146 | } |
@@ -1863,6 +1858,7 @@ again: | |||
1863 | case -ETIMEDOUT: | 1858 | case -ETIMEDOUT: |
1864 | case -EAGAIN: | 1859 | case -EAGAIN: |
1865 | ssleep(1); | 1860 | ssleep(1); |
1861 | case -NFS4ERR_STALE_CLIENTID: | ||
1866 | dprintk("NFS: %s after status %d, retrying\n", | 1862 | dprintk("NFS: %s after status %d, retrying\n", |
1867 | __func__, status); | 1863 | __func__, status); |
1868 | goto again; | 1864 | goto again; |
@@ -2022,8 +2018,18 @@ static int nfs4_reset_session(struct nfs_client *clp) | |||
2022 | nfs4_begin_drain_session(clp); | 2018 | nfs4_begin_drain_session(clp); |
2023 | cred = nfs4_get_exchange_id_cred(clp); | 2019 | cred = nfs4_get_exchange_id_cred(clp); |
2024 | status = nfs4_proc_destroy_session(clp->cl_session, cred); | 2020 | status = nfs4_proc_destroy_session(clp->cl_session, cred); |
2025 | if (status && status != -NFS4ERR_BADSESSION && | 2021 | switch (status) { |
2026 | status != -NFS4ERR_DEADSESSION) { | 2022 | case 0: |
2023 | case -NFS4ERR_BADSESSION: | ||
2024 | case -NFS4ERR_DEADSESSION: | ||
2025 | break; | ||
2026 | case -NFS4ERR_BACK_CHAN_BUSY: | ||
2027 | case -NFS4ERR_DELAY: | ||
2028 | set_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state); | ||
2029 | status = 0; | ||
2030 | ssleep(1); | ||
2031 | goto out; | ||
2032 | default: | ||
2027 | status = nfs4_recovery_handle_error(clp, status); | 2033 | status = nfs4_recovery_handle_error(clp, status); |
2028 | goto out; | 2034 | goto out; |
2029 | } | 2035 | } |