]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.7.7/blk-mq-actually-hook-up-defer-list-when-running-requests.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 4.7.7 / blk-mq-actually-hook-up-defer-list-when-running-requests.patch
CommitLineData
8d8bb877
GKH
1From 52b9c330c6a8a4b5a1819bdaddf4ec76ab571e81 Mon Sep 17 00:00:00 2001
2From: Omar Sandoval <osandov@fb.com>
3Date: Wed, 8 Jun 2016 18:22:20 -0700
4Subject: blk-mq: actually hook up defer list when running requests
5
6From: Omar Sandoval <osandov@fb.com>
7
8commit 52b9c330c6a8a4b5a1819bdaddf4ec76ab571e81 upstream.
9
10If ->queue_rq() returns BLK_MQ_RQ_QUEUE_OK, we use continue and skip
11over the rest of the loop body. However, dptr is assigned later in the
12loop body, and the BLK_MQ_RQ_QUEUE_OK case is exactly the case that we'd
13want it for.
14
15NVMe isn't actually using BLK_MQ_F_DEFER_ISSUE yet, nor is any other
16in-tree driver, but if the code's going to be there, it might as well
17work.
18
19Fixes: 74c450521dd8 ("blk-mq: add a 'list' parameter to ->queue_rq()")
20Signed-off-by: Omar Sandoval <osandov@fb.com>
21Signed-off-by: Jens Axboe <axboe@fb.com>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24---
25 block/blk-mq.c | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28--- a/block/blk-mq.c
29+++ b/block/blk-mq.c
30@@ -784,7 +784,7 @@ static void __blk_mq_run_hw_queue(struct
31 switch (ret) {
32 case BLK_MQ_RQ_QUEUE_OK:
33 queued++;
34- continue;
35+ break;
36 case BLK_MQ_RQ_QUEUE_BUSY:
37 list_add(&rq->queuelist, &rq_list);
38 __blk_mq_requeue_request(rq);