]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
block: remove redundant check about 'set->nr_hw_queues' in blk_mq_alloc_tag_set()
authorXiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Mon, 30 Mar 2015 05:19:14 +0000 (13:19 +0800)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 15:04:27 +0000 (09:04 -0600)
At the beginning of blk_mq_alloc_tag_set(), we have already checked whether
'set->nr_hw_queues' is zero, so here remove this redundant check.

Signed-off-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c

index 59fa23935a0f10e19e13cea5b7086fbf9f85c170..37f14362aa15d121541f73ee15a7575de2b2d562 100644 (file)
@@ -2174,7 +2174,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) {