Browse Source

RDMA/ocrdma: Tiny locking cleanup

We only need to disable the IRQs one time.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

[ Rename "wq_flags" to more conventional "flags."  - Roland ]

Signed-off-by: Roland Dreier <roland@purestorage.com>
Dan Carpenter 13 years ago
parent
commit
d19081e044
1 changed files with 5 additions and 5 deletions
  1. 5 5
      drivers/infiniband/hw/ocrdma/ocrdma_verbs.c

+ 5 - 5
drivers/infiniband/hw/ocrdma/ocrdma_verbs.c

@@ -1431,7 +1431,7 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp)
 	struct ocrdma_dev *dev;
 	struct ocrdma_dev *dev;
 	struct ib_qp_attr attrs;
 	struct ib_qp_attr attrs;
 	int attr_mask = IB_QP_STATE;
 	int attr_mask = IB_QP_STATE;
-	unsigned long wq_flags = 0, rq_flags = 0;
+	unsigned long flags;
 
 
 	qp = get_ocrdma_qp(ibqp);
 	qp = get_ocrdma_qp(ibqp);
 	dev = qp->dev;
 	dev = qp->dev;
@@ -1453,15 +1453,15 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp)
 	 * acquire CQ lock while destroy is in progress, in order to
 	 * acquire CQ lock while destroy is in progress, in order to
 	 * 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, wq_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_irqsave(&qp->rq_cq->cq_lock, rq_flags);
+		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))
 	if (qp->rq_cq && (qp->rq_cq != qp->sq_cq))
-		spin_unlock_irqrestore(&qp->rq_cq->cq_lock, rq_flags);
-	spin_unlock_irqrestore(&qp->sq_cq->cq_lock, wq_flags);
+		spin_unlock(&qp->rq_cq->cq_lock);
+	spin_unlock_irqrestore(&qp->sq_cq->cq_lock, flags);
 
 
 	if (!pd->uctx) {
 	if (!pd->uctx) {
 		ocrdma_discard_cqes(qp, qp->sq_cq);
 		ocrdma_discard_cqes(qp, qp->sq_cq);