Merge remote-tracking branches 'regmap/fix/be', 'regmap/fix/doc' and 'regmap/fix...
[cascardo/linux.git] / drivers / staging / rdma / hfi1 / qp.c
index 29a5ad2..dc9119e 100644 (file)
@@ -519,10 +519,12 @@ static void iowait_sdma_drained(struct iowait *wait)
         * do the flush work until that QP's
         * sdma work has finished.
         */
+       spin_lock(&qp->s_lock);
        if (qp->s_flags & RVT_S_WAIT_DMA) {
                qp->s_flags &= ~RVT_S_WAIT_DMA;
                hfi1_schedule_send(qp);
        }
+       spin_unlock(&qp->s_lock);
 }
 
 /**