]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
blk-mq: ->timeout should be cleared in blk_mq_rq_ctx_init()
authorJens Axboe <axboe@fb.com>
Fri, 6 Jun 2014 17:03:48 +0000 (11:03 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 6 Jun 2014 17:05:25 +0000 (11:05 -0600)
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>
block/blk-mq.c

index 75fc33f342516c883231ca16b3c2129ff386a624..fafea52281ac9498f66eae3c8ac5d536ff335d9c 100644 (file)
@@ -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;