x86/apic/msi: Unbreak DMAR and HPET MSI
[linux-2.6-microblaze.git] / block / blk-mq-sched.c
index a19cdf1..d2790e5 100644 (file)
@@ -78,6 +78,15 @@ void blk_mq_sched_restart(struct blk_mq_hw_ctx *hctx)
                return;
        clear_bit(BLK_MQ_S_SCHED_RESTART, &hctx->state);
 
+       /*
+        * Order clearing SCHED_RESTART and list_empty_careful(&hctx->dispatch)
+        * in blk_mq_run_hw_queue(). Its pair is the barrier in
+        * blk_mq_dispatch_rq_list(). So dispatch code won't see SCHED_RESTART,
+        * meantime new request added to hctx->dispatch is missed to check in
+        * blk_mq_run_hw_queue().
+        */
+       smp_mb();
+
        blk_mq_run_hw_queue(hctx, true);
 }