]> git.baikalelectronics.ru Git - kernel.git/commit
block: move q_usage_counter release into blk_queue_release
authorMing Lei <ming.lei@redhat.com>
Tue, 8 Mar 2022 05:51:57 +0000 (06:51 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Mar 2022 02:40:01 +0000 (19:40 -0700)
commitfd06c189a6e2915eb995a55560c296c459f79653
tree04004f708d092b8c41ba675b733c3dd6f1b47dc9
parent440dfeb4644f40ba024c41fb5dd3e3af2e02a148
block: move q_usage_counter release into blk_queue_release

After blk_cleanup_queue() returns, disk may not be released yet, so
probably bio may still be submitted and ->q_usage_counter may be
touched, so far this way seems safe, but not good from API's viewpoint.

Move the release q_usage_counter into blk_queue_release().

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220308055200.735835-12-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-sysfs.c