diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-01-12 19:12:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-26 02:27:49 +0300 |
commit | 33cf52b6e53a6aa55883aa7fb9ceffceff8488a6 (patch) | |
tree | 658d31cb298ab1c3042b46070ccb569e4db208a1 /block/blk-throttle.c | |
parent | fdf3df297f4d239b2811220dc9917c6bf5597c3d (diff) | |
download | linux-33cf52b6e53a6aa55883aa7fb9ceffceff8488a6.tar.xz |
block: ensure we hold a queue reference when using queue limits
[ Upstream commit 7b4f36cd22a65b750b4cb6ac14804fb7d6e6c67d ]
q_usage_counter is the only thing preventing us from the limits changing
under us in __bio_split_to_limits, but blk_mq_submit_bio doesn't hold
it while calling into it.
Move the splitting inside the region where we know we've got a queue
reference. Ideally this could still remain a shared section of code, but
let's keep the fix simple and defer any refactoring here to later.
Reported-by: Christoph Hellwig <hch@lst.de>
Fixes: 900e08075202 ("block: move queue enter logic into blk_mq_submit_bio()")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block/blk-throttle.c')
0 files changed, 0 insertions, 0 deletions