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/raid0.c | |
parent | 2d1f3b5d1b2cd11a162eb29645df749ec0036413 (diff) | |
download | kernel_samsung_espresso10-9ffae0cf3ea02f75d163922accfd3e592d87adde.zip kernel_samsung_espresso10-9ffae0cf3ea02f75d163922accfd3e592d87adde.tar.gz kernel_samsung_espresso10-9ffae0cf3ea02f75d163922accfd3e592d87adde.tar.bz2 |
[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/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 a2c2e18..b4eaa67 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -113,21 +113,16 @@ static int create_strip_zones (mddev_t *mddev) } printk("raid0: FINAL %d zones\n", conf->nr_strip_zones); - conf->strip_zone = kmalloc(sizeof(struct strip_zone)* + conf->strip_zone = kzalloc(sizeof(struct strip_zone)* conf->nr_strip_zones, GFP_KERNEL); if (!conf->strip_zone) return 1; - conf->devlist = kmalloc(sizeof(mdk_rdev_t*)* + conf->devlist = kzalloc(sizeof(mdk_rdev_t*)* conf->nr_strip_zones*mddev->raid_disks, GFP_KERNEL); if (!conf->devlist) return 1; - memset(conf->strip_zone, 0,sizeof(struct strip_zone)* - conf->nr_strip_zones); - memset(conf->devlist, 0, - sizeof(mdk_rdev_t*) * conf->nr_strip_zones * mddev->raid_disks); - /* The first zone must contain all devices, so here we check that * there is a proper alignment of slots to devices and find them all */ |