summaryrefslogtreecommitdiff
path: root/fs/block_dev.c
diff options
context:
space:
mode:
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)