When not using local_dma_lkey, fmr_op_open() fetches a ib_mr associated
with local write permission. This value is stuffed into the returned
rpcrdma_ia, but ia->ri_dma_mr->lkey was accessed _before_ the ia->ri_dma_mr
was updated.
Fix this by pulling lkey directly from the newly fetched ib_mr rather than
the value previously stored in ia->ri_dma_mr.
Orabug:
22202841
Signed-off-by: Todd Vierling <todd.vierling@oracle.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
__func__, PTR_ERR(mr));
return -ENOMEM;
}
- ia->ri_dma_lkey = ia->ri_dma_mr->lkey;
+ ia->ri_dma_lkey = mr->lkey;
ia->ri_dma_mr = mr;
}