aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma
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/xprtrdma
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/xprtrdma')
-rw-r--r--net/sunrpc/xprtrdma/transport.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index 9d77bf25829f..0f7a1b9d05ad 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -251,9 +251,7 @@ xprt_rdma_destroy(struct rpc_xprt *xprt)
251 251
252 xprt_rdma_free_addresses(xprt); 252 xprt_rdma_free_addresses(xprt);
253 253
254 kfree(xprt->slot); 254 xprt_free(xprt);
255 xprt->slot = NULL;
256 kfree(xprt);
257 255
258 dprintk("RPC: %s: returning\n", __func__); 256 dprintk("RPC: %s: returning\n", __func__);
259 257
@@ -401,8 +399,7 @@ out3:
401out2: 399out2:
402 rpcrdma_ia_close(&new_xprt->rx_ia); 400 rpcrdma_ia_close(&new_xprt->rx_ia);
403out1: 401out1:
404 kfree(xprt->slot); 402 xprt_free(xprt);
405 kfree(xprt);
406 return ERR_PTR(rc); 403 return ERR_PTR(rc);
407} 404}
408 405