blk-mq: dont assume rq->errors is set when returning an error from ->queue_rq
authorChristoph Hellwig <hch@infradead.org>
Tue, 18 Feb 2014 17:26:21 +0000 (09:26 -0800)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:42 +0000 (12:54 -0600)
commit3088f6f93ebcc8294e659a485c08c788ffc7fe9c
tree6b12b3515202d662fdcd885549c55740fbc4e5d3
parent654332ac8d2c7c36f2e055e840e1dab0efbb03e3
blk-mq: dont assume rq->errors is set when returning an error from ->queue_rq

rq->errors never has been part of the communication protocol between drivers
and the block stack and most drivers will not have initialized it.

Return -EIO to upper layers when the driver returns BLK_MQ_RQ_QUEUE_ERROR
unconditionally.  If a driver want to return a different error it can easily
do so by returning success after calling blk_mq_end_io itself.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c