diff options
author | Jens Axboe <axboe@fb.com> | 2014-06-06 13:03:48 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-06-06 13:05:25 -0400 |
commit | f6be4fb4bcb396fc3b1c134b7863351972de081f (patch) | |
tree | 26805801b0e62474c4e70bfbf5e32512d6271efa /block/blk-mq.c | |
parent | 3b632cf0eaa2e89a12c18f043e6e7c5bcc003645 (diff) |
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 <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 2 insertions, 0 deletions
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, | |||
204 | rq->sense = NULL; | 204 | rq->sense = NULL; |
205 | 205 | ||
206 | INIT_LIST_HEAD(&rq->timeout_list); | 206 | INIT_LIST_HEAD(&rq->timeout_list); |
207 | rq->timeout = 0; | ||
208 | |||
207 | rq->end_io = NULL; | 209 | rq->end_io = NULL; |
208 | rq->end_io_data = NULL; | 210 | rq->end_io_data = NULL; |
209 | rq->next_rq = NULL; | 211 | rq->next_rq = NULL; |