mirror of https://gitee.com/openkylin/linux.git
RDMA/efa: Remove umem check on dereg MR flow
EFA driver is not a kverbs provider, the check for MR umem is redundant. Link: https://lore.kernel.org/r/20190826115350.21718-2-galpress@amazon.com Reviewed-by: Firas JahJah <firasj@amazon.com> Reviewed-by: Yossi Leybovich <sleybo@amazon.com> Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
d8abe88450
commit
958b6813f0
|
@ -1500,14 +1500,12 @@ int efa_dereg_mr(struct ib_mr *ibmr, struct ib_udata *udata)
|
|||
|
||||
ibdev_dbg(&dev->ibdev, "Deregister mr[%d]\n", ibmr->lkey);
|
||||
|
||||
if (mr->umem) {
|
||||
params.l_key = mr->ibmr.lkey;
|
||||
err = efa_com_dereg_mr(&dev->edev, ¶ms);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
ib_umem_release(mr->umem);
|
||||
params.l_key = mr->ibmr.lkey;
|
||||
err = efa_com_dereg_mr(&dev->edev, ¶ms);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
ib_umem_release(mr->umem);
|
||||
kfree(mr);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue