diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2008-05-28 20:17:44 +0200 |
---|---|---|
committer | Tom Tucker <tom@opengridcomputing.com> | 2008-07-02 22:01:56 +0200 |
commit | 87295b6c5c7fd7bbc0ce3e7f42d2adbbac7352b9 (patch) | |
tree | 11a273d3fd2c61bbbf102b80c0b45a0f0021d499 /net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |
parent | svcrdma: Move the DMA unmap logic to the CQ handler (diff) | |
download | linux-87295b6c5c7fd7bbc0ce3e7f42d2adbbac7352b9.tar.xz linux-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.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, 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, |