Skip to content

Commit b4e94f9

Browse files
Christoph Hellwigaxboe
authored andcommitted
Revert "blk-cgroup: delay calling blkcg_exit_disk until disk_release"
This reverts commit c43332f as it is not needed without moving to disk references in the blkg. Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 1231039 commit b4e94f9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

block/blk-throttle.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,8 +2407,7 @@ void blk_throtl_exit(struct gendisk *disk)
24072407
{
24082408
struct request_queue *q = disk->queue;
24092409

2410-
if (!q->td)
2411-
return;
2410+
BUG_ON(!q->td);
24122411
del_timer_sync(&q->td->service_queue.pending_timer);
24132412
throtl_shutdown_wq(q);
24142413
blkcg_deactivate_policy(disk, &blkcg_policy_throtl);

block/genhd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,8 @@ void del_gendisk(struct gendisk *disk)
668668
rq_qos_exit(q);
669669
blk_mq_unquiesce_queue(q);
670670

671+
blkcg_exit_disk(disk);
672+
671673
/*
672674
* If the disk does not own the queue, allow using passthrough requests
673675
* again. Else leave the queue frozen to fail all I/O.
@@ -1164,8 +1166,6 @@ static void disk_release(struct device *dev)
11641166
might_sleep();
11651167
WARN_ON_ONCE(disk_live(disk));
11661168

1167-
blkcg_exit_disk(disk);
1168-
11691169
/*
11701170
* To undo the all initialization from blk_mq_init_allocated_queue in
11711171
* case of a probe failure where add_disk is never called we have to

0 commit comments

Comments
 (0)