aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/clnt.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-06-14 16:40:14 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-07-10 23:40:28 -0400
commit6529eba08fe7297852391a468d95322913de73fa (patch)
tree6c9e0fa67de82f8a0c0df4e5bed9dbfefe3f1ac2 /net/sunrpc/clnt.c
parentc6d00e639bdec5f33460bc95bae4efda7177a6ed (diff)
SUNRPC: Move rpc_task->tk_task list into struct rpc_clnt
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r--net/sunrpc/clnt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index d8fbee40a19c..6631ece14983 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -148,6 +148,7 @@ static struct rpc_clnt * rpc_new_client(struct rpc_xprt *xprt, char *servname, s
148 if (clnt->cl_metrics == NULL) 148 if (clnt->cl_metrics == NULL)
149 goto out_no_stats; 149 goto out_no_stats;
150 clnt->cl_program = program; 150 clnt->cl_program = program;
151 INIT_LIST_HEAD(&clnt->cl_tasks);
151 152
152 if (!xprt_bound(clnt->cl_xprt)) 153 if (!xprt_bound(clnt->cl_xprt))
153 clnt->cl_autobind = 1; 154 clnt->cl_autobind = 1;
@@ -172,6 +173,7 @@ static struct rpc_clnt * rpc_new_client(struct rpc_xprt *xprt, char *servname, s
172 if (clnt->cl_nodelen > UNX_MAXNODENAME) 173 if (clnt->cl_nodelen > UNX_MAXNODENAME)
173 clnt->cl_nodelen = UNX_MAXNODENAME; 174 clnt->cl_nodelen = UNX_MAXNODENAME;
174 memcpy(clnt->cl_nodename, utsname()->nodename, clnt->cl_nodelen); 175 memcpy(clnt->cl_nodename, utsname()->nodename, clnt->cl_nodelen);
176 rpc_register_client(clnt);
175 return clnt; 177 return clnt;
176 178
177out_no_auth: 179out_no_auth:
@@ -283,9 +285,11 @@ rpc_clone_client(struct rpc_clnt *clnt)
283 new->cl_autobind = 0; 285 new->cl_autobind = 0;
284 new->cl_oneshot = 0; 286 new->cl_oneshot = 0;
285 new->cl_dead = 0; 287 new->cl_dead = 0;
288 INIT_LIST_HEAD(&new->cl_tasks);
286 rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval); 289 rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval);
287 if (new->cl_auth) 290 if (new->cl_auth)
288 atomic_inc(&new->cl_auth->au_count); 291 atomic_inc(&new->cl_auth->au_count);
292 rpc_register_client(new);
289 return new; 293 return new;
290out_no_path: 294out_no_path:
291 rpc_free_iostats(new->cl_metrics); 295 rpc_free_iostats(new->cl_metrics);
@@ -357,6 +361,7 @@ rpc_destroy_client(struct rpc_clnt *clnt)
357 if (clnt->cl_server != clnt->cl_inline_name) 361 if (clnt->cl_server != clnt->cl_inline_name)
358 kfree(clnt->cl_server); 362 kfree(clnt->cl_server);
359out_free: 363out_free:
364 rpc_unregister_client(clnt);
360 rpc_free_iostats(clnt->cl_metrics); 365 rpc_free_iostats(clnt->cl_metrics);
361 clnt->cl_metrics = NULL; 366 clnt->cl_metrics = NULL;
362 xprt_put(clnt->cl_xprt); 367 xprt_put(clnt->cl_xprt);