aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-01-06 03:20:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:34:05 -0500
commit9ffae0cf3ea02f75d163922accfd3e592d87adde (patch)
tree4974727e9f36e1b618b68d2789644ee3a0d7a371 /drivers/md/raid5.c
parent2d1f3b5d1b2cd11a162eb29645df749ec0036413 (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.c8
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)