summaryrefslogtreecommitdiff
path: root/block/blk-ia-ranges.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-11-14 07:26:36 +0300
committerJens Axboe <axboe@kernel.dk>2022-11-30 21:09:00 +0300
commit2bd85221a625b316114bafaab527770b607095d3 (patch)
treecd00e40d6010e33c1e2f957ed1f2203c84a43b13 /block/blk-ia-ranges.c
parent40602997be26887bdfa3d58659c3acb4579099e9 (diff)
downloadlinux-2bd85221a625b316114bafaab527770b607095d3.tar.xz
block: untangle request_queue refcounting from sysfs
The kobject embedded into the request_queue is used for the queue directory in sysfs, but that is a child of the gendisks directory and is intimately tied to it. Move this kobject to the gendisk and use a refcount_t in the request_queue for the actual request_queue refcounting that is completely unrelated to the device model. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20221114042637.1009333-5-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-ia-ranges.c')
-rw-r--r--block/blk-ia-ranges.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-ia-ranges.c b/block/blk-ia-ranges.c
index 2bd1d311033b..2141931ddd37 100644
--- a/block/blk-ia-ranges.c
+++ b/block/blk-ia-ranges.c
@@ -123,7 +123,8 @@ int disk_register_independent_access_ranges(struct gendisk *disk)
*/
WARN_ON(iars->sysfs_registered);
ret = kobject_init_and_add(&iars->kobj, &blk_ia_ranges_ktype,
- &q->kobj, "%s", "independent_access_ranges");
+ &disk->queue_kobj, "%s",
+ "independent_access_ranges");
if (ret) {
disk->ia_ranges = NULL;
kobject_put(&iars->kobj);