Commit d1210d5a authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

blk-mq: simplify blk_mq_rq_timed_out

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 88b0cfad
...@@ -770,22 +770,16 @@ EXPORT_SYMBOL(blk_mq_tag_to_rq); ...@@ -770,22 +770,16 @@ EXPORT_SYMBOL(blk_mq_tag_to_rq);
static void blk_mq_rq_timed_out(struct request *req, bool reserved) static void blk_mq_rq_timed_out(struct request *req, bool reserved)
{ {
const struct blk_mq_ops *ops = req->q->mq_ops; if (req->q->mq_ops->timeout) {
enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER; enum blk_eh_timer_return ret;
if (ops->timeout) ret = req->q->mq_ops->timeout(req, reserved);
ret = ops->timeout(req, reserved); if (ret == BLK_EH_DONE)
return;
switch (ret) { WARN_ON_ONCE(ret != BLK_EH_RESET_TIMER);
case BLK_EH_RESET_TIMER:
blk_add_timer(req);
break;
case BLK_EH_DONE:
break;
default:
printk(KERN_ERR "block: bad eh return: %d\n", ret);
break;
} }
blk_add_timer(req);
} }
static bool blk_mq_req_expired(struct request *rq, unsigned long *next) static bool blk_mq_req_expired(struct request *rq, unsigned long *next)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment