You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
block: implement and use {disk|part}_to_dev()
Implement {disk|part}_to_dev() and use them to access generic device
instead of directly dereferencing {disk|part}->dev. To make sure no
user is left behind, rename generic devices fields to __dev.
This is in preparation of unifying partition 0 handling with other
partitions.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
+2
-2
@@ -543,9 +543,9 @@ EXPORT_SYMBOL(bd_release);
|
||||
static struct kobject *bdev_get_kobj(struct block_device *bdev)
|
||||
{
|
||||
if (bdev->bd_contains != bdev)
|
||||
return kobject_get(&bdev->bd_part->dev.kobj);
|
||||
return kobject_get(&part_to_dev(bdev->bd_part)->kobj);
|
||||
else
|
||||
return kobject_get(&bdev->bd_disk->dev.kobj);
|
||||
return kobject_get(&disk_to_dev(bdev->bd_disk)->kobj);
|
||||
}
|
||||
|
||||
static struct kobject *bdev_get_holder(struct block_device *bdev)
|
||||
|
||||
Reference in New Issue
Block a user