|
@@ -262,12 +262,9 @@ static int ib_uverbs_cleanup_ucontext(struct ib_uverbs_file *file,
|
|
container_of(uobj, struct ib_uqp_object, uevent.uobject);
|
|
container_of(uobj, struct ib_uqp_object, uevent.uobject);
|
|
|
|
|
|
idr_remove_uobj(&ib_uverbs_qp_idr, uobj);
|
|
idr_remove_uobj(&ib_uverbs_qp_idr, uobj);
|
|
- if (qp != qp->real_qp) {
|
|
|
|
- ib_close_qp(qp);
|
|
|
|
- } else {
|
|
|
|
|
|
+ if (qp == qp->real_qp)
|
|
ib_uverbs_detach_umcast(qp, uqp);
|
|
ib_uverbs_detach_umcast(qp, uqp);
|
|
- ib_destroy_qp(qp);
|
|
|
|
- }
|
|
|
|
|
|
+ ib_destroy_qp(qp);
|
|
ib_uverbs_release_uevent(file, &uqp->uevent);
|
|
ib_uverbs_release_uevent(file, &uqp->uevent);
|
|
kfree(uqp);
|
|
kfree(uqp);
|
|
}
|
|
}
|