diff options
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index a2c2e184c0ac..b4eaa67fabde 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -113,21 +113,16 @@ static int create_strip_zones (mddev_t *mddev) | |||
113 | } | 113 | } |
114 | printk("raid0: FINAL %d zones\n", conf->nr_strip_zones); | 114 | printk("raid0: FINAL %d zones\n", conf->nr_strip_zones); |
115 | 115 | ||
116 | conf->strip_zone = kmalloc(sizeof(struct strip_zone)* | 116 | conf->strip_zone = kzalloc(sizeof(struct strip_zone)* |
117 | conf->nr_strip_zones, GFP_KERNEL); | 117 | conf->nr_strip_zones, GFP_KERNEL); |
118 | if (!conf->strip_zone) | 118 | if (!conf->strip_zone) |
119 | return 1; | 119 | return 1; |
120 | conf->devlist = kmalloc(sizeof(mdk_rdev_t*)* | 120 | conf->devlist = kzalloc(sizeof(mdk_rdev_t*)* |
121 | conf->nr_strip_zones*mddev->raid_disks, | 121 | conf->nr_strip_zones*mddev->raid_disks, |
122 | GFP_KERNEL); | 122 | GFP_KERNEL); |
123 | if (!conf->devlist) | 123 | if (!conf->devlist) |
124 | return 1; | 124 | return 1; |
125 | 125 | ||
126 | memset(conf->strip_zone, 0,sizeof(struct strip_zone)* | ||
127 | conf->nr_strip_zones); | ||
128 | memset(conf->devlist, 0, | ||
129 | sizeof(mdk_rdev_t*) * conf->nr_strip_zones * mddev->raid_disks); | ||
130 | |||
131 | /* The first zone must contain all devices, so here we check that | 126 | /* The first zone must contain all devices, so here we check that |
132 | * there is a proper alignment of slots to devices and find them all | 127 | * there is a proper alignment of slots to devices and find them all |
133 | */ | 128 | */ |