summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 7b71ab1b1536..fec8fcc4f8a4 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1623,6 +1623,11 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
if (set->timeout)
blk_queue_rq_timeout(q, set->timeout);
+ /*
+ * Do this after blk_queue_make_request() overrides it...
+ */
+ q->nr_requests = set->queue_depth;
+
if (set->ops->complete)
blk_queue_softirq_done(q, set->ops->complete);