]> 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)
commit7ceca7a13f5f85a495405750fbd0eaed30ac2e15
tree33d6a3c6e22f9df0f2eca95b2bc21f9a72c3eda4
parentf012122ea840147013cdda044f94f37a76b82cf0
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