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:
Gal Pressman 2019-08-26 14:53:49 +03:00 committed by Jason Gunthorpe
parent d8abe88450
commit 958b6813f0
1 changed files with 5 additions and 7 deletions

View File

@ -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, &params);
if (err)
return err;
}
ib_umem_release(mr->umem);
params.l_key = mr->ibmr.lkey;
err = efa_com_dereg_mr(&dev->edev, &params);
if (err)
return err;
ib_umem_release(mr->umem);
kfree(mr);
return 0;