Don't assign ->rq_timeout twice.

Signed-off-by: Wei Fang <fangw...@huawei.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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to