From: Ming Lei Date: Fri, 19 Sep 2014 13:53:46 +0000 (+0800) Subject: blk-timeout: fix blk_add_timer X-Git-Tag: v4.14-rc1~6394^2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e940aaa597c15e916618240ae5838864f36c91e;p=platform%2Fkernel%2Flinux-rpi.git blk-timeout: fix blk_add_timer Commit 8cb34819cdd5d(blk-mq: unshared timeout handler) introduces blk-mq's own timeout handler, and removes following line: blk_queue_rq_timed_out(q, blk_mq_rq_timed_out); which then causes blk_add_timer() to bypass adding the timer, since blk-mq no longer has q->rq_timed_out_fn defined. This patch fixes the problem by bypassing the check for blk-mq, so that both request deadlines are still set and the rolling timer updated. Signed-off-by: Ming Lei Signed-off-by: Jens Axboe --- diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 4d44825..8bae410 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c @@ -186,7 +186,8 @@ void blk_add_timer(struct request *req) struct request_queue *q = req->q; unsigned long expiry; - if (!q->rq_timed_out_fn) + /* blk-mq has its own handler, so we don't need ->rq_timed_out_fn */ + if (!q->mq_ops && !q->rq_timed_out_fn) return; BUG_ON(!list_empty(&req->timeout_list));