diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 0302723fa21f..1778104e106c 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1238,6 +1238,7 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev) | |||
1238 | mdk_rdev_t *same_pdev; | 1238 | mdk_rdev_t *same_pdev; |
1239 | char b[BDEVNAME_SIZE], b2[BDEVNAME_SIZE]; | 1239 | char b[BDEVNAME_SIZE], b2[BDEVNAME_SIZE]; |
1240 | struct kobject *ko; | 1240 | struct kobject *ko; |
1241 | char *s; | ||
1241 | 1242 | ||
1242 | if (rdev->mddev) { | 1243 | if (rdev->mddev) { |
1243 | MD_BUG(); | 1244 | MD_BUG(); |
@@ -1277,6 +1278,8 @@ static int bind_rdev_to_array(mdk_rdev_t * rdev, mddev_t * mddev) | |||
1277 | bdevname(rdev->bdev,b); | 1278 | bdevname(rdev->bdev,b); |
1278 | if (kobject_set_name(&rdev->kobj, "dev-%s", b) < 0) | 1279 | if (kobject_set_name(&rdev->kobj, "dev-%s", b) < 0) |
1279 | return -ENOMEM; | 1280 | return -ENOMEM; |
1281 | while ( (s=strchr(rdev->kobj.k_name, '/')) != NULL) | ||
1282 | *s = '!'; | ||
1280 | 1283 | ||
1281 | list_add(&rdev->same_set, &mddev->disks); | 1284 | list_add(&rdev->same_set, &mddev->disks); |
1282 | rdev->mddev = mddev; | 1285 | rdev->mddev = mddev; |