linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blk-mq: remove unnecessary check in blk_mq_alloc_tag_set
@ 2015-04-06  4:44 nimisolo
  2015-04-06 15:54 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: nimisolo @ 2015-04-06  4:44 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel, nimisolo

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

Signed-off-by: nimisolo <nimisolo@aliyun.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-06 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-06  4:44 [PATCH] blk-mq: remove unnecessary check in blk_mq_alloc_tag_set nimisolo
2015-04-06 15:54 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).