lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1428295474-15585-1-git-send-email-nimisolo@aliyun.com>
Date:	Sun,  5 Apr 2015 21:44:34 -0700
From:	nimisolo <nimisolo@...yun.com>
To:	axboe@...nel.dk
Cc:	linux-kernel@...r.kernel.org, nimisolo <nimisolo@...yun.com>
Subject: [PATCH] blk-mq: remove unnecessary check in blk_mq_alloc_tag_set

already check set->nr_hw_queues above :
	if (!set->nr_hw_queues)
		return -EINVAL;

Signed-off-by: nimisolo <nimisolo@...yun.com>
---
 block/blk-mq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index b7b8933..3ae21c4 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2161,7 +2161,7 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
 	if (set->queue_depth < set->reserved_tags + BLK_MQ_TAG_MIN)
 		return -EINVAL;
 
-	if (!set->nr_hw_queues || !set->ops->queue_rq || !set->ops->map_queue)
+	if (!set->ops->queue_rq || !set->ops->map_queue)
 		return -EINVAL;
 
 	if (set->queue_depth > BLK_MQ_MAX_DEPTH) {
-- 
1.9.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

Powered by Openwall GNU/*/Linux Powered by OpenVZ