From f6be4fb4bcb396fc3b1c134b7863351972de081f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 6 Jun 2014 11:03:48 -0600 Subject: [PATCH] blk-mq: ->timeout should be cleared in blk_mq_rq_ctx_init() It'll be used in blk_mq_start_request() to set a potential timeout for the request, so clear it to zero at alloc time to ensure that we know if someone has set it or not. Fixes random early timeouts on NVMe testing. Signed-off-by: Jens Axboe --- block/blk-mq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-mq.c b/block/blk-mq.c index 75fc33f34251..fafea52281ac 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -204,6 +204,8 @@ static void blk_mq_rq_ctx_init(struct request_queue *q, struct blk_mq_ctx *ctx, rq->sense = NULL; INIT_LIST_HEAD(&rq->timeout_list); + rq->timeout = 0; + rq->end_io = NULL; rq->end_io_data = NULL; rq->next_rq = NULL; -- 2.20.1