OSDN Git Service
(root)
/
uclinux-h8
/
linux.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
8a825ae
..
44d471f
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);