Commit d431a555 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Don't create an rpc_pipefs directory before rpc_clone is initialised

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 4c402b40
...@@ -269,6 +269,12 @@ rpc_clone_client(struct rpc_clnt *clnt) ...@@ -269,6 +269,12 @@ rpc_clone_client(struct rpc_clnt *clnt)
new = kmemdup(clnt, sizeof(*new), GFP_KERNEL); new = kmemdup(clnt, sizeof(*new), GFP_KERNEL);
if (!new) if (!new)
goto out_no_clnt; goto out_no_clnt;
new->cl_parent = clnt;
/* Turn off autobind on clones */
new->cl_autobind = 0;
INIT_LIST_HEAD(&new->cl_tasks);
spin_lock_init(&new->cl_lock);
rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval);
new->cl_metrics = rpc_alloc_iostats(clnt); new->cl_metrics = rpc_alloc_iostats(clnt);
if (new->cl_metrics == NULL) if (new->cl_metrics == NULL)
goto out_no_stats; goto out_no_stats;
...@@ -276,16 +282,10 @@ rpc_clone_client(struct rpc_clnt *clnt) ...@@ -276,16 +282,10 @@ rpc_clone_client(struct rpc_clnt *clnt)
err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name); err = rpc_setup_pipedir(new, clnt->cl_program->pipe_dir_name);
if (err != 0) if (err != 0)
goto out_no_path; goto out_no_path;
new->cl_parent = clnt;
kref_get(&clnt->cl_kref);
new->cl_xprt = xprt_get(clnt->cl_xprt);
/* Turn off autobind on clones */
new->cl_autobind = 0;
INIT_LIST_HEAD(&new->cl_tasks);
spin_lock_init(&new->cl_lock);
rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval);
if (new->cl_auth) if (new->cl_auth)
atomic_inc(&new->cl_auth->au_count); atomic_inc(&new->cl_auth->au_count);
xprt_get(clnt->cl_xprt);
kref_get(&clnt->cl_kref);
rpc_register_client(new); rpc_register_client(new);
return new; return new;
out_no_path: out_no_path:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment