]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - 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
1 From 52b9c330c6a8a4b5a1819bdaddf4ec76ab571e81 Mon Sep 17 00:00:00 2001
2 From: Omar Sandoval <osandov@fb.com>
3 Date: Wed, 8 Jun 2016 18:22:20 -0700
4 Subject: blk-mq: actually hook up defer list when running requests
5
6 From: Omar Sandoval <osandov@fb.com>
7
8 commit 52b9c330c6a8a4b5a1819bdaddf4ec76ab571e81 upstream.
9
10 If ->queue_rq() returns BLK_MQ_RQ_QUEUE_OK, we use continue and skip
11 over the rest of the loop body. However, dptr is assigned later in the
12 loop body, and the BLK_MQ_RQ_QUEUE_OK case is exactly the case that we'd
13 want it for.
14
15 NVMe isn't actually using BLK_MQ_F_DEFER_ISSUE yet, nor is any other
16 in-tree driver, but if the code's going to be there, it might as well
17 work.
18
19 Fixes: 74c450521dd8 ("blk-mq: add a 'list' parameter to ->queue_rq()")
20 Signed-off-by: Omar Sandoval <osandov@fb.com>
21 Signed-off-by: Jens Axboe <axboe@fb.com>
22 Signed-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);