projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f25191b
)
block: avoid setting nr_requests to current value
author
Aleksei Zakharov
<zakharov.a.g@yandex.ru>
Fri, 8 Feb 2019 16:14:05 +0000
(19:14 +0300)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 8 Feb 2019 19:43:25 +0000
(12:43 -0700)
There's no reason to freeze queue and set nr_requests value
if current value is the same.
Signed-off-by: Aleksei Zakharov <zakharov.a.g@yandex.ru>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
patch
|
blob
|
history
diff --git
a/block/blk-mq.c
b/block/blk-mq.c
index 8a825aebc6b5e5c32ae742f90f1563ef4bc266a6..44d471ff8754c5e9c026ed8634b8d1d1e0589a5b 100644
(file)
--- a/
block/blk-mq.c
+++ b/
block/blk-mq.c
@@
-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);