diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ec5186fd510a..9fc50487e2ed 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -1827,12 +1827,12 @@ static int run(mddev_t *mddev) | |||
1827 | return -EIO; | 1827 | return -EIO; |
1828 | } | 1828 | } |
1829 | 1829 | ||
1830 | mddev->private = kmalloc (sizeof (raid5_conf_t) | 1830 | mddev->private = kzalloc(sizeof (raid5_conf_t) |
1831 | + mddev->raid_disks * sizeof(struct disk_info), | 1831 | + mddev->raid_disks * sizeof(struct disk_info), |
1832 | GFP_KERNEL); | 1832 | GFP_KERNEL); |
1833 | if ((conf = mddev->private) == NULL) | 1833 | if ((conf = mddev->private) == NULL) |
1834 | goto abort; | 1834 | goto abort; |
1835 | memset (conf, 0, sizeof (*conf) + mddev->raid_disks * sizeof(struct disk_info) ); | 1835 | |
1836 | conf->mddev = mddev; | 1836 | conf->mddev = mddev; |
1837 | 1837 | ||
1838 | if ((conf->stripe_hashtbl = (struct stripe_head **) __get_free_pages(GFP_ATOMIC, HASH_PAGES_ORDER)) == NULL) | 1838 | if ((conf->stripe_hashtbl = (struct stripe_head **) __get_free_pages(GFP_ATOMIC, HASH_PAGES_ORDER)) == NULL) |