summaryrefslogtreecommitdiff
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2022-03-08 08:51:55 +0300
committerJens Axboe <axboe@kernel.dk>2022-03-09 05:40:01 +0300
commit1059699f87eb0b3aa9d574b91a572d534897134a (patch)
treeaffbee31ae4a5aa5f88a7a8eb75a89a26d016332 /block/blk-sysfs.c
parent01d0c698536fe920733fc6cab7f9740c7acfdece (diff)
downloadlinux-1059699f87eb0b3aa9d574b91a572d534897134a.tar.xz
block: move blkcg initialization/destroy into disk allocation/release handler
blkcg works on FS bio level, so it is reasonable to make both blkcg and gendisk sharing same lifetime. Meantime there won't be any FS IO when releasing disk, so safe to move blkcg initialization/destroy into disk allocation/release handler Long term, we can move blkcg into gendisk completely. Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20220308055200.735835-10-hch@lst.de [axboe: fixup missing blk-cgroup.h include] Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 241ded62f458..220085109d7f 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -751,13 +751,6 @@ static void blk_exit_queue(struct request_queue *q)
ioc_clear_queue(q);
elevator_exit(q);
}
-
- /*
- * Remove all references to @q from the block cgroup controller before
- * restoring @q->queue_lock to avoid that restoring this pointer causes
- * e.g. blkcg_print_blkgs() to crash.
- */
- blkcg_exit_queue(q);
}
/**