diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 1 | ||||
-rw-r--r-- | net/sunrpc/clnt.c | 15 |
2 files changed, 6 insertions, 10 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index beaa7b848246..ef1cf5b476c8 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -719,7 +719,6 @@ gss_destroy(struct rpc_auth *auth) | |||
719 | 719 | ||
720 | gss_auth = container_of(auth, struct gss_auth, rpc_auth); | 720 | gss_auth = container_of(auth, struct gss_auth, rpc_auth); |
721 | rpc_unlink(gss_auth->dentry); | 721 | rpc_unlink(gss_auth->dentry); |
722 | dput(gss_auth->dentry); | ||
723 | gss_auth->dentry = NULL; | 722 | gss_auth->dentry = NULL; |
724 | gss_mech_put(gss_auth->mech); | 723 | gss_mech_put(gss_auth->mech); |
725 | 724 | ||
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index d307556872db..d9eac7069101 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -184,7 +184,6 @@ rpc_new_client(struct rpc_xprt *xprt, char *servname, | |||
184 | out_no_auth: | 184 | out_no_auth: |
185 | if (!IS_ERR(clnt->cl_dentry)) { | 185 | if (!IS_ERR(clnt->cl_dentry)) { |
186 | rpc_rmdir(clnt->cl_dentry); | 186 | rpc_rmdir(clnt->cl_dentry); |
187 | dput(clnt->cl_dentry); | ||
188 | rpc_put_mount(); | 187 | rpc_put_mount(); |
189 | } | 188 | } |
190 | out_no_path: | 189 | out_no_path: |
@@ -251,10 +250,8 @@ rpc_clone_client(struct rpc_clnt *clnt) | |||
251 | new->cl_autobind = 0; | 250 | new->cl_autobind = 0; |
252 | new->cl_oneshot = 0; | 251 | new->cl_oneshot = 0; |
253 | new->cl_dead = 0; | 252 | new->cl_dead = 0; |
254 | if (!IS_ERR(new->cl_dentry)) { | 253 | if (!IS_ERR(new->cl_dentry)) |
255 | dget(new->cl_dentry); | 254 | dget(new->cl_dentry); |
256 | rpc_get_mount(); | ||
257 | } | ||
258 | rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval); | 255 | rpc_init_rtt(&new->cl_rtt_default, clnt->cl_xprt->timeout.to_initval); |
259 | if (new->cl_auth) | 256 | if (new->cl_auth) |
260 | atomic_inc(&new->cl_auth->au_count); | 257 | atomic_inc(&new->cl_auth->au_count); |
@@ -317,11 +314,15 @@ rpc_destroy_client(struct rpc_clnt *clnt) | |||
317 | clnt->cl_auth = NULL; | 314 | clnt->cl_auth = NULL; |
318 | } | 315 | } |
319 | if (clnt->cl_parent != clnt) { | 316 | if (clnt->cl_parent != clnt) { |
317 | if (!IS_ERR(clnt->cl_dentry)) | ||
318 | dput(clnt->cl_dentry); | ||
320 | rpc_destroy_client(clnt->cl_parent); | 319 | rpc_destroy_client(clnt->cl_parent); |
321 | goto out_free; | 320 | goto out_free; |
322 | } | 321 | } |
323 | if (!IS_ERR(clnt->cl_dentry)) | 322 | if (!IS_ERR(clnt->cl_dentry)) { |
324 | rpc_rmdir(clnt->cl_dentry); | 323 | rpc_rmdir(clnt->cl_dentry); |
324 | rpc_put_mount(); | ||
325 | } | ||
325 | if (clnt->cl_xprt) { | 326 | if (clnt->cl_xprt) { |
326 | xprt_destroy(clnt->cl_xprt); | 327 | xprt_destroy(clnt->cl_xprt); |
327 | clnt->cl_xprt = NULL; | 328 | clnt->cl_xprt = NULL; |
@@ -331,10 +332,6 @@ rpc_destroy_client(struct rpc_clnt *clnt) | |||
331 | out_free: | 332 | out_free: |
332 | rpc_free_iostats(clnt->cl_metrics); | 333 | rpc_free_iostats(clnt->cl_metrics); |
333 | clnt->cl_metrics = NULL; | 334 | clnt->cl_metrics = NULL; |
334 | if (!IS_ERR(clnt->cl_dentry)) { | ||
335 | dput(clnt->cl_dentry); | ||
336 | rpc_put_mount(); | ||
337 | } | ||
338 | kfree(clnt); | 335 | kfree(clnt); |
339 | return 0; | 336 | return 0; |
340 | } | 337 | } |