diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index bd4067a70834..6fa60e416a09 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -1337,10 +1337,14 @@ static int grow_stripes(raid5_conf_t *conf, int num) | |||
1337 | struct kmem_cache *sc; | 1337 | struct kmem_cache *sc; |
1338 | int devs = max(conf->raid_disks, conf->previous_raid_disks); | 1338 | int devs = max(conf->raid_disks, conf->previous_raid_disks); |
1339 | 1339 | ||
1340 | sprintf(conf->cache_name[0], | 1340 | if (conf->mddev->gendisk) |
1341 | "raid%d-%s", conf->level, mdname(conf->mddev)); | 1341 | sprintf(conf->cache_name[0], |
1342 | sprintf(conf->cache_name[1], | 1342 | "raid%d-%s", conf->level, mdname(conf->mddev)); |
1343 | "raid%d-%s-alt", conf->level, mdname(conf->mddev)); | 1343 | else |
1344 | sprintf(conf->cache_name[0], | ||
1345 | "raid%d-%p", conf->level, conf->mddev); | ||
1346 | sprintf(conf->cache_name[1], "%s-alt", conf->cache_name[0]); | ||
1347 | |||
1344 | conf->active_name = 0; | 1348 | conf->active_name = 0; |
1345 | sc = kmem_cache_create(conf->cache_name[conf->active_name], | 1349 | sc = kmem_cache_create(conf->cache_name[conf->active_name], |
1346 | sizeof(struct stripe_head)+(devs-1)*sizeof(struct r5dev), | 1350 | sizeof(struct stripe_head)+(devs-1)*sizeof(struct r5dev), |