All of lore.kernel.org
 help / color / mirror / Atom feed
From: fangwei <fangwei1@huawei.com>
To: <axboe@kernel.dk>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] blk-mq: put blk_queue_rq_timeout together in blk_mq_init_queue.
Date: Mon, 30 Mar 2015 19:51:10 +0800	[thread overview]
Message-ID: <551938AE.5080002@huawei.com> (raw)

Don't assign ->rq_timeout twice.

Signed-off-by: Wei Fang <fangwei1@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


             reply	other threads:[~2015-03-30 11:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 11:51 fangwei [this message]
2015-03-30 15:06 ` [PATCH] blk-mq: put blk_queue_rq_timeout together in blk_mq_init_queue Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551938AE.5080002@huawei.com \
    --to=fangwei1@huawei.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.