summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
diff options
context:
space:
mode:
authorTom Tucker <tom@opengridcomputing.com>2008-05-28 13:17:44 -0500
committerTom Tucker <tom@opengridcomputing.com>2008-07-02 15:01:56 -0500
commit87295b6c5c7fd7bbc0ce3e7f42d2adbbac7352b9 (patch)
tree11a273d3fd2c61bbbf102b80c0b45a0f0021d499 /net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
parente6ab9143719ff76f0b95f0866c4d0f6c743ad2e0 (diff)
downloadlinux-stable-87295b6c5c7fd7bbc0ce3e7f42d2adbbac7352b9.tar.gz
linux-stable-87295b6c5c7fd7bbc0ce3e7f42d2adbbac7352b9.tar.bz2
linux-stable-87295b6c5c7fd7bbc0ce3e7f42d2adbbac7352b9.zip
svcrdma: Add dma map count and WARN_ON
Add a dma map count in order to verify that all DMA mapping resources have been freed when the transport is closed. Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/svc_rdma_recvfrom.c')
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_recvfrom.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index d25971b42a74..b4b17f44cb29 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -222,6 +222,7 @@ static void rdma_set_ctxt_sge(struct svcxprt_rdma *xprt,
ctxt->count = count;
ctxt->direction = DMA_FROM_DEVICE;
for (i = 0; i < count; i++) {
+ atomic_inc(&xprt->sc_dma_used);
ctxt->sge[i].addr =
ib_dma_map_single(xprt->sc_cm_id->device,
vec[i].iov_base, vec[i].iov_len,