mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
committed by
Jens Axboe
parent
40602997be
commit
2bd85221a6
@@ -140,8 +140,8 @@ int blk_crypto_sysfs_register(struct gendisk *disk)
|
||||
return -ENOMEM;
|
||||
obj->profile = q->crypto_profile;
|
||||
|
||||
err = kobject_init_and_add(&obj->kobj, &blk_crypto_ktype, &q->kobj,
|
||||
"crypto");
|
||||
err = kobject_init_and_add(&obj->kobj, &blk_crypto_ktype,
|
||||
&disk->queue_kobj, "crypto");
|
||||
if (err) {
|
||||
kobject_put(&obj->kobj);
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user