diff options
Diffstat (limited to 'fs/partitions')
-rw-r--r-- | fs/partitions/Kconfig | 3 | ||||
-rw-r--r-- | fs/partitions/check.c | 13 |
2 files changed, 6 insertions, 10 deletions
diff --git a/fs/partitions/Kconfig b/fs/partitions/Kconfig index 74552c60b671..6e8bb66fe619 100644 --- a/fs/partitions/Kconfig +++ b/fs/partitions/Kconfig | |||
@@ -235,5 +235,4 @@ config EFI_PARTITION | |||
235 | select CRC32 | 235 | select CRC32 |
236 | help | 236 | help |
237 | Say Y here if you would like to use hard disks under Linux which | 237 | Say Y here if you would like to use hard disks under Linux which |
238 | were partitioned using EFI GPT. Presently only useful on the | 238 | were partitioned using EFI GPT. |
239 | IA-64 platform. | ||
diff --git a/fs/partitions/check.c b/fs/partitions/check.c index ac32a2e8540c..8a7d0035ad7a 100644 --- a/fs/partitions/check.c +++ b/fs/partitions/check.c | |||
@@ -180,7 +180,7 @@ check_partition(struct gendisk *hd, struct block_device *bdev) | |||
180 | } | 180 | } |
181 | if (res > 0) | 181 | if (res > 0) |
182 | return state; | 182 | return state; |
183 | if (!err) | 183 | if (err) |
184 | /* The partition is unrecognized. So report I/O errors if there were any */ | 184 | /* The partition is unrecognized. So report I/O errors if there were any */ |
185 | res = err; | 185 | res = err; |
186 | if (!res) | 186 | if (!res) |
@@ -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); |
@@ -542,7 +541,7 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev) | |||
542 | if (!get_capacity(disk) || !(state = check_partition(disk, bdev))) | 541 | if (!get_capacity(disk) || !(state = check_partition(disk, bdev))) |
543 | return 0; | 542 | return 0; |
544 | if (IS_ERR(state)) /* I/O error reading the partition table */ | 543 | if (IS_ERR(state)) /* I/O error reading the partition table */ |
545 | return PTR_ERR(state); | 544 | return -EIO; |
546 | for (p = 1; p < state->limit; p++) { | 545 | for (p = 1; p < state->limit; p++) { |
547 | sector_t size = state->parts[p].size; | 546 | sector_t size = state->parts[p].size; |
548 | sector_t from = state->parts[p].from; | 547 | sector_t from = state->parts[p].from; |
@@ -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"); |