Commit b4e94f9c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

Revert "blk-cgroup: delay calling blkcg_exit_disk until disk_release"

This reverts commit c43332fe as it is not
needed without moving to disk references in the blkg.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230214183308.1658775-3-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1231039d
...@@ -2407,8 +2407,7 @@ void blk_throtl_exit(struct gendisk *disk) ...@@ -2407,8 +2407,7 @@ void blk_throtl_exit(struct gendisk *disk)
{ {
struct request_queue *q = disk->queue; struct request_queue *q = disk->queue;
if (!q->td) BUG_ON(!q->td);
return;
del_timer_sync(&q->td->service_queue.pending_timer); del_timer_sync(&q->td->service_queue.pending_timer);
throtl_shutdown_wq(q); throtl_shutdown_wq(q);
blkcg_deactivate_policy(disk, &blkcg_policy_throtl); blkcg_deactivate_policy(disk, &blkcg_policy_throtl);
......
...@@ -668,6 +668,8 @@ void del_gendisk(struct gendisk *disk) ...@@ -668,6 +668,8 @@ void del_gendisk(struct gendisk *disk)
rq_qos_exit(q); rq_qos_exit(q);
blk_mq_unquiesce_queue(q); blk_mq_unquiesce_queue(q);
blkcg_exit_disk(disk);
/* /*
* If the disk does not own the queue, allow using passthrough requests * If the disk does not own the queue, allow using passthrough requests
* again. Else leave the queue frozen to fail all I/O. * again. Else leave the queue frozen to fail all I/O.
...@@ -1164,8 +1166,6 @@ static void disk_release(struct device *dev) ...@@ -1164,8 +1166,6 @@ static void disk_release(struct device *dev)
might_sleep(); might_sleep();
WARN_ON_ONCE(disk_live(disk)); WARN_ON_ONCE(disk_live(disk));
blkcg_exit_disk(disk);
/* /*
* To undo the all initialization from blk_mq_init_allocated_queue in * To undo the all initialization from blk_mq_init_allocated_queue in
* case of a probe failure where add_disk is never called we have to * case of a probe failure where add_disk is never called we have to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment