Skip to content

Commit 55ce0da

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: fix blk_abort_request for blk-mq drivers
We only added the request to the request list for the !blk-mq case, so we should only delete it in that case as well. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
1 parent bf508e9 commit 55ce0da

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

block/blk-timeout.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,13 @@ void blk_abort_request(struct request *req)
158158
{
159159
if (blk_mark_rq_complete(req))
160160
return;
161-
blk_delete_timer(req);
162-
if (req->q->mq_ops)
161+
162+
if (req->q->mq_ops) {
163163
blk_mq_rq_timed_out(req, false);
164-
else
164+
} else {
165+
blk_delete_timer(req);
165166
blk_rq_timed_out(req);
167+
}
166168
}
167169
EXPORT_SYMBOL_GPL(blk_abort_request);
168170

0 commit comments

Comments
 (0)