]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: put the driver tag of nxt rq before first one is requeued
authorJianchao Wang <jianchao.w.wang@oracle.com>
Thu, 2 Nov 2017 15:24:32 +0000 (23:24 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 4 Nov 2017 18:38:40 +0000 (12:38 -0600)
commit4043775253be4f89823b1dd8bef08f761aa108f5
tree33d6a3c6e22f9df0f2eca95b2bc21f9a72c3eda4
parentc9ad76e3f0f3b35d38ab476db16279771b3c6d34
blk-mq: put the driver tag of nxt rq before first one is requeued

When freeing the driver tag of the next rq with an I/O scheduler
configured, we get the first entry of the list. However, this can
race with requeue of a request, and we end up getting the wrong request
from the head of the list. Free the driver tag of next rq before the
failed one is requeued in the failure branch of queue_rq callback.

Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c