diff options
Diffstat (limited to 'fs/partitions')
-rw-r--r-- | fs/partitions/check.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index 97f3f5f064ee..739da701ae7b 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -314,7 +314,7 @@ void delete_partition(struct gendisk *disk, int part) | |||
314 | p->nr_sects = 0; | 314 | p->nr_sects = 0; |
315 | p->ios[0] = p->ios[1] = 0; | 315 | p->ios[0] = p->ios[1] = 0; |
316 | p->sectors[0] = p->sectors[1] = 0; | 316 | p->sectors[0] = p->sectors[1] = 0; |
317 | kobject_unregister(p->holder_dir); | 317 | kobject_put(p->holder_dir); |
318 | device_del(&p->dev); | 318 | device_del(&p->dev); |
319 | put_device(&p->dev); | 319 | put_device(&p->dev); |
320 | } | 320 | } |
@@ -505,8 +505,8 @@ void del_gendisk(struct gendisk *disk) | |||
505 | disk_stat_set_all(disk, 0); | 505 | disk_stat_set_all(disk, 0); |
506 | disk->stamp = 0; | 506 | disk->stamp = 0; |
507 | 507 | ||
508 | kobject_unregister(disk->holder_dir); | 508 | kobject_put(disk->holder_dir); |
509 | kobject_unregister(disk->slave_dir); | 509 | kobject_put(disk->slave_dir); |
510 | disk->driverfs_dev = NULL; | 510 | disk->driverfs_dev = NULL; |
511 | #ifndef CONFIG_SYSFS_DEPRECATED | 511 | #ifndef CONFIG_SYSFS_DEPRECATED |
512 | sysfs_remove_link(block_depr, disk->dev.bus_id); | 512 | sysfs_remove_link(block_depr, disk->dev.bus_id); |