RDMA/ocrdma: Make ocrdma_destroy_qp() easier to analyze
This patch does not change any functionality but avoids that sparse reports the following: drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1818:31: warning: context imbalance in 'ocrdma_destroy_qp' - different lock contexts for basic block Compile-tested only. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com> Cc: Selvin Xavier <selvin.xavier@broadcom.com> Cc: Devesh Sharma <devesh.sharma@broadcom.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
parent
07f3355df7
commit
beae9eb555
@ -1774,13 +1774,13 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp)
|
|||||||
* protect against proessing in-flight CQEs for this QP.
|
* protect against proessing in-flight CQEs for this QP.
|
||||||
*/
|
*/
|
||||||
spin_lock_irqsave(&qp->sq_cq->cq_lock, flags);
|
spin_lock_irqsave(&qp->sq_cq->cq_lock, flags);
|
||||||
if (qp->rq_cq && (qp->rq_cq != qp->sq_cq))
|
if (qp->rq_cq && (qp->rq_cq != qp->sq_cq)) {
|
||||||
spin_lock(&qp->rq_cq->cq_lock);
|
spin_lock(&qp->rq_cq->cq_lock);
|
||||||
|
ocrdma_del_qpn_map(dev, qp);
|
||||||
ocrdma_del_qpn_map(dev, qp);
|
|
||||||
|
|
||||||
if (qp->rq_cq && (qp->rq_cq != qp->sq_cq))
|
|
||||||
spin_unlock(&qp->rq_cq->cq_lock);
|
spin_unlock(&qp->rq_cq->cq_lock);
|
||||||
|
} else {
|
||||||
|
ocrdma_del_qpn_map(dev, qp);
|
||||||
|
}
|
||||||
spin_unlock_irqrestore(&qp->sq_cq->cq_lock, flags);
|
spin_unlock_irqrestore(&qp->sq_cq->cq_lock, flags);
|
||||||
|
|
||||||
if (!pd->uctx) {
|
if (!pd->uctx) {
|
||||||
|
Loading…
Reference in New Issue
Block a user