xprtrdma: Don't require LOCAL_DMA_LKEY support for fastreg
authorSagi Grimberg <sagig@mellanox.com>
Tue, 6 Oct 2015 16:52:37 +0000 (19:52 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 6 Oct 2015 18:23:00 +0000 (14:23 -0400)
commitf022fa88ce6abc83c6e678a890df5c1e4b0eaf89
treefeea7955246663f847bafb3e6b6b8c3efae7029f
parent3805eade3b7c4a5ad593525703c2c82a84fd9b13
xprtrdma: Don't require LOCAL_DMA_LKEY support for fastreg

There is no need to require LOCAL_DMA_LKEY support as the
PD allocation makes sure that there is a local_dma_lkey. Also
correctly set a return value in error path.

This caused a NULL pointer dereference in mlx5 which removed
the support for LOCAL_DMA_LKEY.

Fixes: bb6c96d72879 ("xprtrdma: Replace global lkey with lkey local to PD")
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Acked-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
net/sunrpc/xprtrdma/verbs.c