提交 e5fa8140 编写于 作者: A Aleksei Zakharov 提交者: Jens Axboe

block: avoid setting nr_requests to current value

There's no reason to freeze queue and set nr_requests value
if current value is the same.
Signed-off-by: NAleksei Zakharov <zakharov.a.g@yandex.ru>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 f25191bb
......@@ -3089,6 +3089,9 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)
if (!set)
return -EINVAL;
if (q->nr_requests == nr)
return 0;
blk_mq_freeze_queue(q);
blk_mq_quiesce_queue(q);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册