summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2010-09-29 14:03:13 +0200
committerJ. Bruce Fields <bfields@redhat.com>2010-10-01 23:18:53 +0200
commite204e621b4160c802315bc2d0fa335337c0d62e8 (patch)
treef61889925880484b71ce8b5dbef9a95c3a3b4acb /net/sunrpc/xprtrdma
parentsunrpc: Factor out rpc_xprt allocation (diff)
downloadlinux-e204e621b4160c802315bc2d0fa335337c0d62e8.tar.xz
linux-e204e621b4160c802315bc2d0fa335337c0d62e8.zip
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)
xprt_rdma_free_addresses(xprt);
- kfree(xprt->slot);
- xprt->slot = NULL;
- kfree(xprt);
+ xprt_free(xprt);
dprintk("RPC: %s: returning\n", __func__);
@@ -401,8 +399,7 @@ out3:
out2:
rpcrdma_ia_close(&new_xprt->rx_ia);
out1:
- kfree(xprt->slot);
- kfree(xprt);
+ xprt_free(xprt);
return ERR_PTR(rc);
}