summaryrefslogtreecommitdiff
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-23 13:23:31 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-05-23 15:20:57 -0400
commit7b38c3682c5cab4f98751d5fe57b78a59020653d (patch)
treec6c2ea72b99b59b60a3c7ba3d142a4926664398e /fs/nfs/client.c
parentacdeb69d9c5934a678a732b4e24770326bf9471e (diff)
NFSv4.1: Fix session initialisation races
Session initialisation is not complete until the lease manager has run. We need to ensure that both nfs4_init_session and nfs4_init_ds_session do so, and that they check for any resulting errors in clp->cl_cons_state. Only after this is done, can nfs4_ds_connect check the contents of clp->cl_exchange_flags. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Andy Adamson <andros@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 3c144689f9e4..25dde0745cfa 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -592,22 +592,6 @@ void nfs_mark_client_ready(struct nfs_client *clp, int state)
}
/*
- * With sessions, the client is not marked ready until after a
- * successful EXCHANGE_ID and CREATE_SESSION.
- *
- * Map errors cl_cons_state errors to EPROTONOSUPPORT to indicate
- * other versions of NFS can be tried.
- */
-int nfs4_check_client_ready(struct nfs_client *clp)
-{
- if (!nfs4_has_session(clp))
- return 0;
- if (clp->cl_cons_state < NFS_CS_READY)
- return -EPROTONOSUPPORT;
- return 0;
-}
-
-/*
* Initialise the timeout values for a connection
*/
static void nfs_init_timeout_values(struct rpc_timeout *to, int proto,