diff options
author | Tejun Heo <tj@kernel.org> | 2008-08-25 06:56:05 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:07 -0400 |
commit | ed9e1982347b36573cd622ee5f4e2a7ccd79b3fd (patch) | |
tree | 79d834094d655ec97cfc0a382a9207ebc8e711a5 /fs/block_dev.c | |
parent | 870d6656126add8e383645732b03df2b7ccd4f94 (diff) |
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>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r-- | fs/block_dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index 2f2873b9a041..a02df22f37c3 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -543,9 +543,9 @@ EXPORT_SYMBOL(bd_release); | |||
543 | static struct kobject *bdev_get_kobj(struct block_device *bdev) | 543 | static struct kobject *bdev_get_kobj(struct block_device *bdev) |
544 | { | 544 | { |
545 | if (bdev->bd_contains != bdev) | 545 | if (bdev->bd_contains != bdev) |
546 | return kobject_get(&bdev->bd_part->dev.kobj); | 546 | return kobject_get(&part_to_dev(bdev->bd_part)->kobj); |
547 | else | 547 | else |
548 | return kobject_get(&bdev->bd_disk->dev.kobj); | 548 | return kobject_get(&disk_to_dev(bdev->bd_disk)->kobj); |
549 | } | 549 | } |
550 | 550 | ||
551 | static struct kobject *bdev_get_holder(struct block_device *bdev) | 551 | static struct kobject *bdev_get_holder(struct block_device *bdev) |