aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-06-16 09:52:27 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-06-22 13:24:03 -0400
commit1055d76d91e69c8ea9fb748db4d4a53b6384df31 (patch)
tree4bcb3c6427b48eadc5e0b226d5b8522f4dd32ee9 /fs/nfs/nfs4proc.c
parentfe74ba3a8db003410e48863a5cafa6ac90674540 (diff)
NFSv4.1: There is no need to init the session more than once...
Set up a flag to ensure that is indeed the case. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b4132fe14282..243d6c72cfa1 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4807,6 +4807,8 @@ struct nfs4_session *nfs4_alloc_session(struct nfs_client *clp)
4807 spin_lock_init(&tbl->slot_tbl_lock); 4807 spin_lock_init(&tbl->slot_tbl_lock);
4808 rpc_init_wait_queue(&tbl->slot_tbl_waitq, "BackChannel Slot table"); 4808 rpc_init_wait_queue(&tbl->slot_tbl_waitq, "BackChannel Slot table");
4809 4809
4810 session->session_state = 1<<NFS4_SESSION_INITING;
4811
4810 session->clp = clp; 4812 session->clp = clp;
4811 return session; 4813 return session;
4812} 4814}
@@ -5023,6 +5025,10 @@ int nfs4_init_session(struct nfs_server *server)
5023 if (!nfs4_has_session(clp)) 5025 if (!nfs4_has_session(clp))
5024 return 0; 5026 return 0;
5025 5027
5028 session = clp->cl_session;
5029 if (!test_and_clear_bit(NFS4_SESSION_INITING, &session->session_state))
5030 return 0;
5031
5026 rsize = server->rsize; 5032 rsize = server->rsize;
5027 if (rsize == 0) 5033 if (rsize == 0)
5028 rsize = NFS_MAX_FILE_IO_SIZE; 5034 rsize = NFS_MAX_FILE_IO_SIZE;
@@ -5030,7 +5036,6 @@ int nfs4_init_session(struct nfs_server *server)
5030 if (wsize == 0) 5036 if (wsize == 0)
5031 wsize = NFS_MAX_FILE_IO_SIZE; 5037 wsize = NFS_MAX_FILE_IO_SIZE;
5032 5038
5033 session = clp->cl_session;
5034 session->fc_attrs.max_rqst_sz = wsize + nfs41_maxwrite_overhead; 5039 session->fc_attrs.max_rqst_sz = wsize + nfs41_maxwrite_overhead;
5035 session->fc_attrs.max_resp_sz = rsize + nfs41_maxread_overhead; 5040 session->fc_attrs.max_resp_sz = rsize + nfs41_maxread_overhead;
5036 5041