diff options
-rw-r--r-- | drivers/md/raid5.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 94a74cb5cccb..b8a2c5dc67ba 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -5097,8 +5097,15 @@ static void raid5_finish_reshape(mddev_t *mddev) | |||
5097 | mddev->degraded--; | 5097 | mddev->degraded--; |
5098 | for (d = conf->raid_disks ; | 5098 | for (d = conf->raid_disks ; |
5099 | d < conf->raid_disks - mddev->delta_disks; | 5099 | d < conf->raid_disks - mddev->delta_disks; |
5100 | d++) | 5100 | d++) { |
5101 | raid5_remove_disk(mddev, d); | 5101 | mdk_rdev_t *rdev = conf->disks[d].rdev; |
5102 | if (rdev && raid5_remove_disk(mddev, d) == 0) { | ||
5103 | char nm[20]; | ||
5104 | sprintf(nm, "rd%d", rdev->raid_disk); | ||
5105 | sysfs_remove_link(&mddev->kobj, nm); | ||
5106 | rdev->raid_disk = -1; | ||
5107 | } | ||
5108 | } | ||
5102 | } | 5109 | } |
5103 | mddev->layout = conf->algorithm; | 5110 | mddev->layout = conf->algorithm; |
5104 | mddev->chunk_sectors = conf->chunk_sectors; | 5111 | mddev->chunk_sectors = conf->chunk_sectors; |