]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - block/blk-mq.c
blk-mq: use blk_mq_start_hw_queues() when running requeue work
[karo-tx-linux.git] / block / blk-mq.c
index 1583ed28ea03fae496bb302ebf28a9a985a0765c..c88e6089746d82267c61d572baa25fe855704f22 100644 (file)
@@ -479,7 +479,11 @@ static void blk_mq_requeue_work(struct work_struct *work)
                blk_mq_insert_request(rq, false, false, false);
        }
 
-       blk_mq_run_queues(q, false);
+       /*
+        * Use the start variant of queue running here, so that running
+        * the requeue work will kick stopped queues.
+        */
+       blk_mq_start_hw_queues(q);
 }
 
 void blk_mq_add_to_requeue_list(struct request *rq, bool at_head)
@@ -963,14 +967,9 @@ void blk_mq_insert_request(struct request *rq, bool at_head, bool run_queue,
 
        hctx = q->mq_ops->map_queue(q, ctx->cpu);
 
-       if (rq->cmd_flags & (REQ_FLUSH | REQ_FUA) &&
-           !(rq->cmd_flags & (REQ_FLUSH_SEQ))) {
-               blk_insert_flush(rq);
-       } else {
-               spin_lock(&ctx->lock);
-               __blk_mq_insert_request(hctx, rq, at_head);
-               spin_unlock(&ctx->lock);
-       }
+       spin_lock(&ctx->lock);
+       __blk_mq_insert_request(hctx, rq, at_head);
+       spin_unlock(&ctx->lock);
 
        if (run_queue)
                blk_mq_run_hw_queue(hctx, async);
@@ -1964,7 +1963,6 @@ out_unwind:
        while (--i >= 0)
                blk_mq_free_rq_map(set, set->tags[i], i);
 
-       set->tags = NULL;
        return -ENOMEM;
 }