Skip to content

Commit

Permalink
[PATCH] kobject/hotplug split - block core
Browse files Browse the repository at this point in the history
kobject_add() and kobject_del() don't emit hotplug events anymore. Do it
ourselves if we are finished populating the device directory.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
kay.sievers@vrfy.org authored and Greg KH committed Apr 19, 2005
1 parent 0700f56 commit b41148c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/partitions/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ void register_disk(struct gendisk *disk)
if ((err = kobject_add(&disk->kobj)))
return;
disk_sysfs_symlinks(disk);
kobject_hotplug(&disk->kobj, KOBJ_ADD);

/* No minors to use for partitions */
if (disk->minors == 1) {
Expand Down Expand Up @@ -441,5 +442,6 @@ void del_gendisk(struct gendisk *disk)
sysfs_remove_link(&disk->driverfs_dev->kobj, "block");
put_device(disk->driverfs_dev);
}
kobject_hotplug(&disk->kobj, KOBJ_REMOVE);
kobject_del(&disk->kobj);
}

0 comments on commit b41148c

Please sign in to comment.