summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprtrdma/fmr_ops.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2016-06-29 13:53:02 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2016-07-11 15:50:43 -0400
commit42fe28f607634841e870acf16b10469824594463 (patch)
treebfaf5e9aff7bb89e76b9e6bf9aa69a7269f95628 /net/sunrpc/xprtrdma/fmr_ops.c
parent505bbe64dd04b105c1377703252758ac56f92485 (diff)
xprtrdma: Do not leak an MW during a DMA map failure
Based on code audit. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/fmr_ops.c')
-rw-r--r--net/sunrpc/xprtrdma/fmr_ops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/fmr_ops.c b/net/sunrpc/xprtrdma/fmr_ops.c
index 4837ced20b65..6c4527b6c3ca 100644
--- a/net/sunrpc/xprtrdma/fmr_ops.c
+++ b/net/sunrpc/xprtrdma/fmr_ops.c
@@ -257,6 +257,7 @@ fmr_op_map(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mr_seg *seg,
out_dmamap_err:
pr_err("rpcrdma: failed to dma map sg %p sg_nents %u\n",
mw->mw_sg, mw->mw_nents);
+ rpcrdma_defer_mr_recovery(mw);
return -ENOMEM;
out_maperr: