]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code
authorBart Van Assche <bart.vanassche@sandisk.com>
Sat, 29 Oct 2016 00:22:00 +0000 (17:22 -0700)
committerJens Axboe <axboe@fb.com>
Wed, 2 Nov 2016 18:50:19 +0000 (12:50 -0600)
Instead of manipulating both QUEUE_FLAG_STOPPED and BLK_MQ_S_STOPPED
in the dm start and stop queue functions, only manipulate the latter
flag. Change blk_queue_stopped() tests into blk_mq_queue_stopped().

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/md/dm-rq.c

index 315257959fc0de9bcfb3eb9701c6199363eb9462..09c958b6f038f899c9248b6635ea22869cdedfe8 100644 (file)
@@ -75,12 +75,6 @@ static void dm_old_start_queue(struct request_queue *q)
 
 static void dm_mq_start_queue(struct request_queue *q)
 {
-       unsigned long flags;
-
-       spin_lock_irqsave(q->queue_lock, flags);
-       queue_flag_clear(QUEUE_FLAG_STOPPED, q);
-       spin_unlock_irqrestore(q->queue_lock, flags);
-
        blk_mq_start_stopped_hw_queues(q, true);
        blk_mq_kick_requeue_list(q);
 }
@@ -105,16 +99,8 @@ static void dm_old_stop_queue(struct request_queue *q)
 
 static void dm_mq_stop_queue(struct request_queue *q)
 {
-       unsigned long flags;
-
-       spin_lock_irqsave(q->queue_lock, flags);
-       if (blk_queue_stopped(q)) {
-               spin_unlock_irqrestore(q->queue_lock, flags);
+       if (blk_mq_queue_stopped(q))
                return;
-       }
-
-       queue_flag_set(QUEUE_FLAG_STOPPED, q);
-       spin_unlock_irqrestore(q->queue_lock, flags);
 
        blk_mq_stop_hw_queues(q);
 }