summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-timeout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c
index 4d448259e622..8bae410b8a1b 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));