diff options
Diffstat (limited to 'fs/partitions/check.c')
-rw-r--r-- | fs/partitions/check.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index ace6d03602c7..f0f604950ff4 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -305,16 +305,6 @@ struct device_type part_type = { | |||
305 | .release = part_release, | 305 | .release = part_release, |
306 | }; | 306 | }; |
307 | 307 | ||
308 | static inline void disk_sysfs_add_subdirs(struct gendisk *disk) | ||
309 | { | ||
310 | struct kobject *k; | ||
311 | |||
312 | k = kobject_get(&disk_to_dev(disk)->kobj); | ||
313 | disk->holder_dir = kobject_create_and_add("holders", k); | ||
314 | disk->slave_dir = kobject_create_and_add("slaves", k); | ||
315 | kobject_put(k); | ||
316 | } | ||
317 | |||
318 | static void delete_partition_rcu_cb(struct rcu_head *head) | 308 | static void delete_partition_rcu_cb(struct rcu_head *head) |
319 | { | 309 | { |
320 | struct hd_struct *part = container_of(head, struct hd_struct, rcu_head); | 310 | struct hd_struct *part = container_of(head, struct hd_struct, rcu_head); |
@@ -464,7 +454,8 @@ void register_disk(struct gendisk *disk) | |||
464 | return; | 454 | return; |
465 | } | 455 | } |
466 | #endif | 456 | #endif |
467 | disk_sysfs_add_subdirs(disk); | 457 | disk->part0.holder_dir = kobject_create_and_add("holders", &ddev->kobj); |
458 | disk->slave_dir = kobject_create_and_add("slaves", &ddev->kobj); | ||
468 | 459 | ||
469 | /* No minors to use for partitions */ | 460 | /* No minors to use for partitions */ |
470 | if (!disk_partitionable(disk)) | 461 | if (!disk_partitionable(disk)) |
@@ -592,7 +583,7 @@ void del_gendisk(struct gendisk *disk) | |||
592 | disk_stat_set_all(disk, 0); | 583 | disk_stat_set_all(disk, 0); |
593 | disk->stamp = 0; | 584 | disk->stamp = 0; |
594 | 585 | ||
595 | kobject_put(disk->holder_dir); | 586 | kobject_put(disk->part0.holder_dir); |
596 | kobject_put(disk->slave_dir); | 587 | kobject_put(disk->slave_dir); |
597 | disk->driverfs_dev = NULL; | 588 | disk->driverfs_dev = NULL; |
598 | #ifndef CONFIG_SYSFS_DEPRECATED | 589 | #ifndef CONFIG_SYSFS_DEPRECATED |