diff options
author | NeilBrown <neilb@suse.de> | 2006-01-06 00:20:32 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 08:34:05 -0800 |
commit | 9ffae0cf3ea02f75d163922accfd3e592d87adde (patch) | |
tree | 4974727e9f36e1b618b68d2789644ee3a0d7a371 /drivers/md/raid5.c | |
parent | 2d1f3b5d1b2cd11a162eb29645df749ec0036413 (diff) |
[PATCH] md: convert md to use kzalloc throughout
Replace multiple kmalloc/memset pairs with kzalloc calls.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 ec5186fd510..9fc50487e2e 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -1827,12 +1827,12 @@ static int run(mddev_t *mddev) return -EIO; } - mddev->private = kmalloc (sizeof (raid5_conf_t) - + mddev->raid_disks * sizeof(struct disk_info), - GFP_KERNEL); + mddev->private = kzalloc(sizeof (raid5_conf_t) + + mddev->raid_disks * sizeof(struct disk_info), + GFP_KERNEL); if ((conf = mddev->private) == NULL) goto abort; - memset (conf, 0, sizeof (*conf) + mddev->raid_disks * sizeof(struct disk_info) ); + conf->mddev = mddev; if ((conf->stripe_hashtbl = (struct stripe_head **) __get_free_pages(GFP_ATOMIC, HASH_PAGES_ORDER)) == NULL) |