提交 4ca08500 编写于 作者: M Ming Lei 提交者: Jens Axboe

blk-mq: user (1 << order) to implement order_to_size()

Cc: Jörg-Volker Peetz <jvpeetz@web.de>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: NMing Lei <tom.leiming@gmail.com>
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 48479005
......@@ -1130,12 +1130,7 @@ static void blk_mq_free_rq_map(struct blk_mq_tag_set *set,
static size_t order_to_size(unsigned int order)
{
size_t ret = PAGE_SIZE;
while (order--)
ret *= 2;
return ret;
return (size_t)PAGE_SIZE << order;
}
static struct blk_mq_tags *blk_mq_init_rq_map(struct blk_mq_tag_set *set,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册