|
@@ -1579,6 +1579,8 @@ struct ib_cq *ib_create_cq(struct ib_device *device,
|
|
|
cq->event_handler = event_handler;
|
|
cq->event_handler = event_handler;
|
|
|
cq->cq_context = cq_context;
|
|
cq->cq_context = cq_context;
|
|
|
atomic_set(&cq->usecnt, 0);
|
|
atomic_set(&cq->usecnt, 0);
|
|
|
|
|
+ cq->res.type = RDMA_RESTRACK_CQ;
|
|
|
|
|
+ rdma_restrack_add(&cq->res);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return cq;
|
|
return cq;
|
|
@@ -1597,6 +1599,7 @@ int ib_destroy_cq(struct ib_cq *cq)
|
|
|
if (atomic_read(&cq->usecnt))
|
|
if (atomic_read(&cq->usecnt))
|
|
|
return -EBUSY;
|
|
return -EBUSY;
|
|
|
|
|
|
|
|
|
|
+ rdma_restrack_del(&cq->res);
|
|
|
return cq->device->destroy_cq(cq);
|
|
return cq->device->destroy_cq(cq);
|
|
|
}
|
|
}
|
|
|
EXPORT_SYMBOL(ib_destroy_cq);
|
|
EXPORT_SYMBOL(ib_destroy_cq);
|