summaryrefslogtreecommitdiff
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-08-25 19:56:05 +0900
committerJens Axboe <jens.axboe@oracle.com>2008-10-09 08:56:07 +0200
commited9e1982347b36573cd622ee5f4e2a7ccd79b3fd (patch)
tree79d834094d655ec97cfc0a382a9207ebc8e711a5 /fs/block_dev.c
parent870d6656126add8e383645732b03df2b7ccd4f94 (diff)
downloadlwn-ed9e1982347b36573cd622ee5f4e2a7ccd79b3fd.tar.gz
lwn-ed9e1982347b36573cd622ee5f4e2a7ccd79b3fd.zip
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.c4
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);
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)