diff mbox series

[v2,6/6] blk-mq: Drop local variable for reserved tag

Message ID 1655810143-67784-7-git-send-email-john.garry@huawei.com
State Superseded
Headers show
Series blk-mq: Add a flag for reserved requests series | expand

Commit Message

John Garry June 21, 2022, 11:15 a.m. UTC
The local variable is now only referenced once so drop it.

Signed-off-by: John Garry <john.garry@huawei.com>
---
 block/blk-mq-tag.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Bart Van Assche June 23, 2022, 1:10 p.m. UTC | #1
On 6/21/22 04:15, John Garry wrote:
> The local variable is now only referenced once so drop it.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff mbox series

Patch

diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 509c35f080a9..b8cc8b41553f 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -266,7 +266,6 @@  static bool bt_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
 	struct blk_mq_hw_ctx *hctx = iter_data->hctx;
 	struct request_queue *q = iter_data->q;
 	struct blk_mq_tag_set *set = q->tag_set;
-	bool reserved = iter_data->reserved;
 	struct blk_mq_tags *tags;
 	struct request *rq;
 	bool ret = true;
@@ -276,7 +275,7 @@  static bool bt_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
 	else
 		tags = hctx->tags;
 
-	if (!reserved)
+	if (!iter_data->reserved)
 		bitnr += tags->nr_reserved_tags;
 	/*
 	 * We can hit rq == NULL here, because the tagging functions
@@ -337,12 +336,11 @@  static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
 {
 	struct bt_tags_iter_data *iter_data = data;
 	struct blk_mq_tags *tags = iter_data->tags;
-	bool reserved = iter_data->flags & BT_TAG_ITER_RESERVED;
 	struct request *rq;
 	bool ret = true;
 	bool iter_static_rqs = !!(iter_data->flags & BT_TAG_ITER_STATIC_RQS);
 
-	if (!reserved)
+	if (!(iter_data->flags & BT_TAG_ITER_RESERVED))
 		bitnr += tags->nr_reserved_tags;
 
 	/*