diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-14 16:40:14 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:28 -0400 |
commit | 6529eba08fe7297852391a468d95322913de73fa (patch) | |
tree | 6c9e0fa67de82f8a0c0df4e5bed9dbfefe3f1ac2 /net/sunrpc/clnt.c | |
parent | c6d00e639bdec5f33460bc95bae4efda7177a6ed (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.c | 5 |
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 | ||
177 | out_no_auth: | 179 | out_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; |
290 | out_no_path: | 294 | out_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); |
359 | out_free: | 363 | out_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); |