Skip to content
Commit 7b4f36cd authored by Jens Axboe's avatar Jens Axboe
Browse files

block: ensure we hold a queue reference when using queue limits



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: default avatarChristoph Hellwig <hch@lst.de>
Fixes: 900e0807 ("block: move queue enter logic into blk_mq_submit_bio()")
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 309ce674
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment