[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <551938AE.5080002@huawei.com>
Date: Mon, 30 Mar 2015 19:51:10 +0800
From: fangwei <fangwei1@...wei.com>
To: <axboe@...nel.dk>
CC: <linux-kernel@...r.kernel.org>
Subject: [PATCH] blk-mq: put blk_queue_rq_timeout together in blk_mq_init_queue.
Don't assign ->rq_timeout twice.
Signed-off-by: Wei Fang <fangwei1@...wei.com>
---
block/blk-mq.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 4f4bea2..45e91b4 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1941,7 +1941,7 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
goto err_map;
setup_timer(&q->timeout, blk_mq_rq_timer, (unsigned long) q);
- blk_queue_rq_timeout(q, 30000);
+ blk_queue_rq_timeout(q, set->timeout ? set->timeout : 30000);
q->nr_queues = nr_cpu_ids;
q->nr_hw_queues = set->nr_hw_queues;
@@ -1967,9 +1967,6 @@ struct request_queue *blk_mq_init_queue(struct blk_mq_tag_set *set)
else
blk_queue_make_request(q, blk_sq_make_request);
- if (set->timeout)
- blk_queue_rq_timeout(q, set->timeout);
-
/*
* Do this after blk_queue_make_request() overrides it...
*/
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists