Skip to contentSkip to conversation

RDMA/ocrdma: tiny locking cleanup

PATCH Applied Dan Carpenter 2 participants 2 messages May 2, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 RDMA/ocrdma: tiny locking cleanup

We only need to disable the IRQs one time.

drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +3 -3
index 0d1872f..df7836d 100644
@@ -1431,7 +1431,7 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp)
 	struct ocrdma_dev *dev;
 	struct ib_qp_attr attrs;
 	int attr_mask = IB_QP_STATE;
-	unsigned long wq_flags = 0, rq_flags = 0;
+	unsigned long wq_flags;
 
 	qp = get_ocrdma_qp(ibqp);
 	dev = qp->dev;
@@ -1455,12 +1455,12 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp)
 	 */
 	spin_lock_irqsave(&qp->sq_cq->cq_lock, wq_flags);
 	if (qp->rq_cq && (qp->rq_cq != qp->sq_cq))
-		spin_lock_irqsave(&qp->rq_cq->cq_lock, rq_flags);
+		spin_lock(&qp->rq_cq->cq_lock);
 
 	ocrdma_del_qpn_map(dev, qp);
 
 	if (qp->rq_cq && (qp->rq_cq != qp->sq_cq))
-		spin_unlock_irqrestore(&qp->rq_cq->cq_lock, rq_flags);
+		spin_unlock(&qp->rq_cq->cq_lock);
 	spin_unlock_irqrestore(&qp->sq_cq->cq_lock, wq_flags);
 
 	if (!pd->uctx) {

A message that is not in the archive (sent off-list or not yet received): [email protected]