xprtrdma: Fix an frwr_map recovery nit
authorChuck Lever <chuck.lever@oracle.com>
Wed, 24 Apr 2019 13:39:00 +0000 (09:39 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 25 Apr 2019 18:59:25 +0000 (14:59 -0400)
After a DMA map failure in frwr_map, mark the MR so that recycling
won't attempt to DMA unmap it.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Fixes: e2f34e26710b ("xprtrdma: Yet another double DMA-unmap")
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/frwr_ops.c

index 52cb6c1b0c2bc0c3ce84ec485fd1657c3dbd24b4..a2a2e01cb5dd47d7dbd214c48bf6eb1b1829cf87 100644 (file)
@@ -466,7 +466,7 @@ struct rpcrdma_mr_seg *frwr_map(struct rpcrdma_xprt *r_xprt,
        return seg;
 
 out_dmamap_err:
-       frwr->fr_state = FRWR_IS_INVALID;
+       mr->mr_dir = DMA_NONE;
        trace_xprtrdma_frwr_sgerr(mr, i);
        rpcrdma_mr_put(mr);
        return ERR_PTR(-EIO);