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 /drivers/md/dm.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 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 653624792ea..637806695bb 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -1186,7 +1186,7 @@ static void event_callback(void *context) | |||
1186 | list_splice_init(&md->uevent_list, &uevents); | 1186 | list_splice_init(&md->uevent_list, &uevents); |
1187 | spin_unlock_irqrestore(&md->uevent_lock, flags); | 1187 | spin_unlock_irqrestore(&md->uevent_lock, flags); |
1188 | 1188 | ||
1189 | dm_send_uevents(&uevents, &md->disk->dev.kobj); | 1189 | dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj); |
1190 | 1190 | ||
1191 | atomic_inc(&md->event_nr); | 1191 | atomic_inc(&md->event_nr); |
1192 | wake_up(&md->eventq); | 1192 | wake_up(&md->eventq); |
@@ -1643,7 +1643,7 @@ out: | |||
1643 | *---------------------------------------------------------------*/ | 1643 | *---------------------------------------------------------------*/ |
1644 | void dm_kobject_uevent(struct mapped_device *md) | 1644 | void dm_kobject_uevent(struct mapped_device *md) |
1645 | { | 1645 | { |
1646 | kobject_uevent(&md->disk->dev.kobj, KOBJ_CHANGE); | 1646 | kobject_uevent(&disk_to_dev(md->disk)->kobj, KOBJ_CHANGE); |
1647 | } | 1647 | } |
1648 | 1648 | ||
1649 | uint32_t dm_next_uevent_seq(struct mapped_device *md) | 1649 | uint32_t dm_next_uevent_seq(struct mapped_device *md) |