lkml.org 
[lkml]   [2016]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 4/8] blk-mq: Cleanup a loop exit condition
Date
CC: linux-block@vger.kernel.org
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
block/blk-mq.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index e3e9b23..eed6e348 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1607,16 +1607,13 @@ static void blk_mq_exit_hctx(struct request_queue *q,
}

static void blk_mq_exit_hw_queues(struct request_queue *q,
- struct blk_mq_tag_set *set, int nr_queue)
+ struct blk_mq_tag_set *set)
{
struct blk_mq_hw_ctx *hctx;
unsigned int i;

- queue_for_each_hw_ctx(q, hctx, i) {
- if (i == nr_queue)
- break;
+ queue_for_each_hw_ctx(q, hctx, i)
blk_mq_exit_hctx(q, set, hctx, i);
- }
}

static void blk_mq_free_hw_queues(struct request_queue *q,
@@ -2039,7 +2036,7 @@ void blk_mq_free_queue(struct request_queue *q)

blk_mq_del_queue_tag_set(q);

- blk_mq_exit_hw_queues(q, set, set->nr_hw_queues);
+ blk_mq_exit_hw_queues(q, set);
blk_mq_free_hw_queues(q, set);
}

--
1.8.3.1
\
 
 \ /
  Last update: 2016-09-30 15:24    [W:0.123 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site