diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2008-05-28 14:17:44 -0400 |
---|---|---|
committer | Tom Tucker <tom@opengridcomputing.com> | 2008-07-02 16:01:56 -0400 |
commit | 87295b6c5c7fd7bbc0ce3e7f42d2adbbac7352b9 (patch) | |
tree | 11a273d3fd2c61bbbf102b80c0b45a0f0021d499 /net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |
parent | e6ab9143719ff76f0b95f0866c4d0f6c743ad2e0 (diff) |
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.c | 1 |
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, | |||
222 | ctxt->count = count; | 222 | ctxt->count = count; |
223 | ctxt->direction = DMA_FROM_DEVICE; | 223 | ctxt->direction = DMA_FROM_DEVICE; |
224 | for (i = 0; i < count; i++) { | 224 | for (i = 0; i < count; i++) { |
225 | atomic_inc(&xprt->sc_dma_used); | ||
225 | ctxt->sge[i].addr = | 226 | ctxt->sge[i].addr = |
226 | ib_dma_map_single(xprt->sc_cm_id->device, | 227 | ib_dma_map_single(xprt->sc_cm_id->device, |
227 | vec[i].iov_base, vec[i].iov_len, | 228 | vec[i].iov_base, vec[i].iov_len, |