diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-17 17:07:54 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:29 -0400 |
commit | d431a555fcf920e1b5c3e3eba52eb5f5e7836771 (patch) | |
tree | 2f2a11b506742417b91fa2b63d332f4ad27a88db /net | |
parent | 4c402b40970382ded616eadd544fd63feb76cc79 (diff) |
SUNRPC: Don't create an rpc_pipefs directory before rpc_clone is initialised
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/clnt.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index be5524d20822..78bbb359281d 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -269,6 +269,12 @@ rpc_clone_client(struct rpc_clnt *clnt) | |||
269 | new = kmemdup(clnt, sizeof(*new), GFP_KERNEL); | 269 | new = kmemdup(clnt, sizeof(*new), GFP_KERNEL); |
270 | if (!new) | 270 | if (!new) |
271 | goto out_no_clnt; | 271 | goto out_no_clnt; |
272 | new->cl_parent = clnt; | ||
273 | /* Turn off autobind on clones */ | ||
274 | new->cl_autobind = 0; | ||
275 | INIT_LIST_HEAD(&new->cl_tasks); | ||
276 | spin_lock_init(&new->cl_lock); | ||
277 | rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval); | ||
272 | new->cl_metrics = rpc_alloc_iostats(clnt); | 278 | new->cl_metrics = rpc_alloc_iostats(clnt); |
273 | if (new->cl_metrics == NULL) | 279 | if (new->cl_metrics == NULL) |
274 | goto out_no_stats; | 280 | goto out_no_stats; |
@@ -276,16 +282,10 @@ rpc_clone_client(struct rpc_clnt *clnt) | |||
276 | err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name); | 282 | err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name); |
277 | if (err != 0) | 283 | if (err != 0) |
278 | goto out_no_path; | 284 | goto out_no_path; |
279 | new->cl_parent = clnt; | ||
280 | kref_get(&clnt->cl_kref); | ||
281 | new->cl_xprt = xprt_get(clnt->cl_xprt); | ||
282 | /* Turn off autobind on clones */ | ||
283 | new->cl_autobind = 0; | ||
284 | INIT_LIST_HEAD(&new->cl_tasks); | ||
285 | spin_lock_init(&new->cl_lock); | ||
286 | rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval); | ||
287 | if (new->cl_auth) | 285 | if (new->cl_auth) |
288 | atomic_inc(&new->cl_auth->au_count); | 286 | atomic_inc(&new->cl_auth->au_count); |
287 | xprt_get(clnt->cl_xprt); | ||
288 | kref_get(&clnt->cl_kref); | ||
289 | rpc_register_client(new); | 289 | rpc_register_client(new); |
290 | return new; | 290 | return new; |
291 | out_no_path: | 291 | out_no_path: |