aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/uverbs_std_types.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2018-06-24 11:23:45 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-06-25 15:22:01 -0600
commit1ccddc42da03876f60fe2d0a1b124c27ed5ff201 (patch)
tree3a268bc5015fba457de7eadc12064d7dee74467f /drivers/infiniband/core/uverbs_std_types.c
parentRDMA/verbs: Drop kernel variant of create_flow (diff)
downloadlinux-dev-1ccddc42da03876f60fe2d0a1b124c27ed5ff201.tar.xz
linux-dev-1ccddc42da03876f60fe2d0a1b124c27ed5ff201.zip
RDMA/verbs: Drop kernel variant of destroy_flow
Following the removal of ib_create_flow(), adjust the code to get rid of ib_destroy_flow() too. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_std_types.c')
-rw-r--r--drivers/infiniband/core/uverbs_std_types.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/infiniband/core/uverbs_std_types.c b/drivers/infiniband/core/uverbs_std_types.c
index 0df0ac9c1de3..c50d73845a2a 100644
--- a/drivers/infiniband/core/uverbs_std_types.c
+++ b/drivers/infiniband/core/uverbs_std_types.c
@@ -48,14 +48,17 @@ static int uverbs_free_ah(struct ib_uobject *uobject,
static int uverbs_free_flow(struct ib_uobject *uobject,
enum rdma_remove_reason why)
{
- int ret;
struct ib_flow *flow = (struct ib_flow *)uobject->object;
struct ib_uflow_object *uflow =
container_of(uobject, struct ib_uflow_object, uobject);
+ struct ib_qp *qp = flow->qp;
+ int ret;
- ret = ib_destroy_flow(flow);
- if (!ret)
+ ret = qp->device->destroy_flow(flow);
+ if (!ret) {
+ atomic_dec(&qp->usecnt);
ib_uverbs_flow_resources_free(uflow->resources);
+ }
return ret;
}