Commit 0a47d2b
block: don't acquire ->elevator_lock in blk_mq_map_swqueue and blk_mq_realloc_hw_ctxs
Both blk_mq_map_swqueue() and blk_mq_realloc_hw_ctxs() are called before
the request queue is added to tagset list, so the two won't run concurrently
with blk_mq_update_nr_hw_queues().
When the two functions are only called from queue initialization or
blk_mq_update_nr_hw_queues(), elevator switch can't happen.
So remove ->elevator_lock uses from the two functions.
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250505141805.2751237-24-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 9dc7a88 commit 0a47d2b
1 file changed
+4
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4156 | 4156 | | |
4157 | 4157 | | |
4158 | 4158 | | |
4159 | | - | |
4160 | | - | |
4161 | 4159 | | |
4162 | 4160 | | |
4163 | 4161 | | |
| |||
4262 | 4260 | | |
4263 | 4261 | | |
4264 | 4262 | | |
4265 | | - | |
4266 | | - | |
4267 | 4263 | | |
4268 | 4264 | | |
4269 | 4265 | | |
| |||
4567 | 4563 | | |
4568 | 4564 | | |
4569 | 4565 | | |
4570 | | - | |
| 4566 | + | |
4571 | 4567 | | |
4572 | | - | |
4573 | | - | |
4574 | | - | |
4575 | | - | |
4576 | | - | |
4577 | | - | |
4578 | | - | |
4579 | | - | |
| 4568 | + | |
4580 | 4569 | | |
4581 | 4570 | | |
4582 | 4571 | | |
| |||
4608 | 4597 | | |
4609 | 4598 | | |
4610 | 4599 | | |
4611 | | - | |
| 4600 | + | |
4612 | 4601 | | |
4613 | 4602 | | |
4614 | 4603 | | |
| |||
5019 | 5008 | | |
5020 | 5009 | | |
5021 | 5010 | | |
5022 | | - | |
| 5011 | + | |
5023 | 5012 | | |
5024 | 5013 | | |
5025 | 5014 | | |
| |||
0 commit comments