]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
xprtrdma: Don't defer MR recovery if ro_map fails
authorChuck Lever <chuck.lever@oracle.com>
Thu, 8 Jun 2017 15:52:36 +0000 (11:52 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 13 Jul 2017 20:00:11 +0000 (16:00 -0400)
commit1f541895dae956df0be14a3190f507b601ac3fcc
treec4c05cc0be10d9db9505599aa15e2ef967b41992
parent8d75483a232aea9c3224b8146edf45b3bbb552fd
xprtrdma: Don't defer MR recovery if ro_map fails

Deferred MR recovery does a DMA-unmapping of the MW. However, ro_map
invokes rpcrdma_defer_mr_recovery in some error cases where the MW
has not even been DMA-mapped yet.

Avoid a DMA-unmapping error replacing rpcrdma_defer_mr_recovery.

Also note that if ib_dma_map_sg is asked to map 0 nents, it will
return 0. So the extra "if (i == 0)" check is no longer needed.

Fixes: 42fe28f60763 ("xprtrdma: Do not leak an MW during a DMA ...")
Fixes: 505bbe64dd04 ("xprtrdma: Refactor MR recovery work queues")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/fmr_ops.c
net/sunrpc/xprtrdma/frwr_ops.c