aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-27 12:53:10 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-27 14:32:06 -0400
commitbf674c8228710fa4149df3988862dc112860df99 (patch)
treeb633781a7ddee018c4cae04ea2be58e1f7b6eee7 /fs/nfs
parent43ac544cb36adf38338c01968f8e3a5f81b7d629 (diff)
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 'fs/nfs')
-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)
1788 if (cred) 1788 if (cred)
1789 put_rpccred(cred); 1789 put_rpccred(cred);
1790 clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state); 1790 clear_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
1791 return ret; 1791 switch (ret) {
1792 case 0:
1793 break;
1794 case -NFS4ERR_DELAY:
1795 ssleep(1);
1796 set_bit(NFS4CLNT_BIND_CONN_TO_SESSION, &clp->cl_state);
1797 break;
1798 default:
1799 return nfs4_recovery_handle_error(clp, ret);
1800 }
1801 return 0;
1792} 1802}
1793#else /* CONFIG_NFS_V4_1 */ 1803#else /* CONFIG_NFS_V4_1 */
1794static int nfs4_reset_session(struct nfs_client *clp) { return 0; } 1804static int nfs4_reset_session(struct nfs_client *clp) { return 0; }
@@ -1858,6 +1868,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
1858 status = nfs4_bind_conn_to_session(clp); 1868 status = nfs4_bind_conn_to_session(clp);
1859 if (status < 0) 1869 if (status < 0)
1860 goto out_error; 1870 goto out_error;
1871 continue;
1861 } 1872 }
1862 1873
1863 /* First recover reboot state... */ 1874 /* First recover reboot state... */