From 7b38c3682c5cab4f98751d5fe57b78a59020653d Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 23 May 2012 13:23:31 -0400 Subject: 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 Cc: Andy Adamson --- fs/nfs/client.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'fs/nfs/client.c') diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 3c144689f9e..25dde0745cf 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -591,22 +591,6 @@ void nfs_mark_client_ready(struct nfs_client *clp, int state) wake_up_all(&nfs_client_active_wq); } -/* - * 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 */ -- cgit v1.2.3