aboutsummaryrefslogtreecommitdiffstats
path: root/fs/partitions/check.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r--fs/partitions/check.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index ac32a2e8540c..22d38ffc9ef0 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -358,8 +358,7 @@ void delete_partition(struct gendisk *disk, int part)
358 p->ios[0] = p->ios[1] = 0; 358 p->ios[0] = p->ios[1] = 0;
359 p->sectors[0] = p->sectors[1] = 0; 359 p->sectors[0] = p->sectors[1] = 0;
360 sysfs_remove_link(&p->kobj, "subsystem"); 360 sysfs_remove_link(&p->kobj, "subsystem");
361 if (p->holder_dir) 361 kobject_unregister(p->holder_dir);
362 kobject_unregister(p->holder_dir);
363 kobject_uevent(&p->kobj, KOBJ_REMOVE); 362 kobject_uevent(&p->kobj, KOBJ_REMOVE);
364 kobject_del(&p->kobj); 363 kobject_del(&p->kobj);
365 kobject_put(&p->kobj); 364 kobject_put(&p->kobj);
@@ -603,10 +602,8 @@ void del_gendisk(struct gendisk *disk)
603 disk->stamp = 0; 602 disk->stamp = 0;
604 603
605 kobject_uevent(&disk->kobj, KOBJ_REMOVE); 604 kobject_uevent(&disk->kobj, KOBJ_REMOVE);
606 if (disk->holder_dir) 605 kobject_unregister(disk->holder_dir);
607 kobject_unregister(disk->holder_dir); 606 kobject_unregister(disk->slave_dir);
608 if (disk->slave_dir)
609 kobject_unregister(disk->slave_dir);
610 if (disk->driverfs_dev) { 607 if (disk->driverfs_dev) {
611 char *disk_name = make_block_name(disk); 608 char *disk_name = make_block_name(disk);
612 sysfs_remove_link(&disk->kobj, "device"); 609 sysfs_remove_link(&disk->kobj, "device");