From: kay.sievers@vrfy.org Date: Tue, 19 Apr 2005 04:57:36 +0000 (-0700) Subject: [PATCH] kobject/hotplug split - block core X-Git-Tag: v2.6.12-rc3~23^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41148c0d8d2fa0c36cebd9ba3ee4cfc0dc7cb9a;p=linux-2.6 [PATCH] kobject/hotplug split - block core 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 31cff785b3..2cab98a9a6 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c @@ -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) { @@ -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); }