aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2010-09-29 08:03:13 -0400
committerJ. Bruce Fields <bfields@redhat.com>2010-10-01 17:18:53 -0400
commite204e621b4160c802315bc2d0fa335337c0d62e8 (patch)
treef61889925880484b71ce8b5dbef9a95c3a3b4acb /net/sunrpc/xprtsock.c
parentbd1722d4316e42a12fe6337ebe34d7e1e2c088b2 (diff)
sunrpc: Factor out rpc_xprt freeing
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index a7a763821b88..b1e36ec6fd80 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -774,8 +774,7 @@ static void xs_destroy(struct rpc_xprt *xprt)
774 774
775 xs_close(xprt); 775 xs_close(xprt);
776 xs_free_peer_addresses(xprt); 776 xs_free_peer_addresses(xprt);
777 kfree(xprt->slot); 777 xprt_free(xprt);
778 kfree(xprt);
779 module_put(THIS_MODULE); 778 module_put(THIS_MODULE);
780} 779}
781 780
@@ -2362,8 +2361,7 @@ static struct rpc_xprt *xs_setup_udp(struct xprt_create *args)
2362 return xprt; 2361 return xprt;
2363 ret = ERR_PTR(-EINVAL); 2362 ret = ERR_PTR(-EINVAL);
2364out_err: 2363out_err:
2365 kfree(xprt->slot); 2364 xprt_free(xprt);
2366 kfree(xprt);
2367 return ret; 2365 return ret;
2368} 2366}
2369 2367
@@ -2438,8 +2436,7 @@ static struct rpc_xprt *xs_setup_tcp(struct xprt_create *args)
2438 return xprt; 2436 return xprt;
2439 ret = ERR_PTR(-EINVAL); 2437 ret = ERR_PTR(-EINVAL);
2440out_err: 2438out_err:
2441 kfree(xprt->slot); 2439 xprt_free(xprt);
2442 kfree(xprt);
2443 return ret; 2440 return ret;
2444} 2441}
2445 2442
@@ -2519,8 +2516,7 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args)
2519 return xprt; 2516 return xprt;
2520 ret = ERR_PTR(-EINVAL); 2517 ret = ERR_PTR(-EINVAL);
2521out_err: 2518out_err:
2522 kfree(xprt->slot); 2519 xprt_free(xprt);
2523 kfree(xprt);
2524 return ret; 2520 return ret;
2525} 2521}
2526 2522