diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/clnt.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index f0339ae9bf37..aa401560777b 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -290,7 +290,7 @@ static int rpc_client_register(const struct rpc_create_args *args, | |||
290 | struct rpc_auth *auth; | 290 | struct rpc_auth *auth; |
291 | struct net *net = rpc_net_ns(clnt); | 291 | struct net *net = rpc_net_ns(clnt); |
292 | struct super_block *pipefs_sb; | 292 | struct super_block *pipefs_sb; |
293 | int err = 0; | 293 | int err; |
294 | 294 | ||
295 | pipefs_sb = rpc_get_sb_net(net); | 295 | pipefs_sb = rpc_get_sb_net(net); |
296 | if (pipefs_sb) { | 296 | if (pipefs_sb) { |
@@ -299,6 +299,10 @@ static int rpc_client_register(const struct rpc_create_args *args, | |||
299 | goto out; | 299 | goto out; |
300 | } | 300 | } |
301 | 301 | ||
302 | rpc_register_client(clnt); | ||
303 | if (pipefs_sb) | ||
304 | rpc_put_sb_net(net); | ||
305 | |||
302 | auth = rpcauth_create(args->authflavor, clnt); | 306 | auth = rpcauth_create(args->authflavor, clnt); |
303 | if (IS_ERR(auth)) { | 307 | if (IS_ERR(auth)) { |
304 | dprintk("RPC: Couldn't create auth handle (flavor %u)\n", | 308 | dprintk("RPC: Couldn't create auth handle (flavor %u)\n", |
@@ -306,16 +310,14 @@ static int rpc_client_register(const struct rpc_create_args *args, | |||
306 | err = PTR_ERR(auth); | 310 | err = PTR_ERR(auth); |
307 | goto err_auth; | 311 | goto err_auth; |
308 | } | 312 | } |
309 | 313 | return 0; | |
310 | rpc_register_client(clnt); | 314 | err_auth: |
315 | pipefs_sb = rpc_get_sb_net(net); | ||
316 | __rpc_clnt_remove_pipedir(clnt); | ||
311 | out: | 317 | out: |
312 | if (pipefs_sb) | 318 | if (pipefs_sb) |
313 | rpc_put_sb_net(net); | 319 | rpc_put_sb_net(net); |
314 | return err; | 320 | return err; |
315 | |||
316 | err_auth: | ||
317 | __rpc_clnt_remove_pipedir(clnt); | ||
318 | goto out; | ||
319 | } | 321 | } |
320 | 322 | ||
321 | static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, struct rpc_xprt *xprt) | 323 | static struct rpc_clnt * rpc_new_client(const struct rpc_create_args *args, struct rpc_xprt *xprt) |