diff options
author | Christoph Hellwig <hch@lst.de> | 2022-11-14 05:26:36 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-30 11:09:00 -0700 |
commit | 2bd85221a625b316114bafaab527770b607095d3 (patch) | |
tree | cd00e40d6010e33c1e2f957ed1f2203c84a43b13 /block/elevator.c | |
parent | 40602997be26887bdfa3d58659c3acb4579099e9 (diff) |
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/elevator.c')
-rw-r--r-- | block/elevator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c index 14e03632b5b5..adee58e48e2d 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -467,7 +467,7 @@ int elv_register_queue(struct request_queue *q, bool uevent) lockdep_assert_held(&q->sysfs_lock); - error = kobject_add(&e->kobj, &q->kobj, "%s", "iosched"); + error = kobject_add(&e->kobj, &q->disk->queue_kobj, "iosched"); if (!error) { struct elv_fs_entry *attr = e->type->elevator_attrs; if (attr) { |