aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.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/raid10.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/raid10.c')
-rw-r--r--drivers/md/raid10.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index ce729d6daf78..254b50e32135 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -59,10 +59,8 @@ static void * r10bio_pool_alloc(gfp_t gfp_flags, void *data)
59 int size = offsetof(struct r10bio_s, devs[conf->copies]); 59 int size = offsetof(struct r10bio_s, devs[conf->copies]);
60 60
61 /* allocate a r10bio with room for raid_disks entries in the bios array */ 61 /* allocate a r10bio with room for raid_disks entries in the bios array */
62 r10_bio = kmalloc(size, gfp_flags); 62 r10_bio = kzalloc(size, gfp_flags);
63 if (r10_bio) 63 if (!r10_bio)
64 memset(r10_bio, 0, size);
65 else
66 unplug_slaves(conf->mddev); 64 unplug_slaves(conf->mddev);
67 65
68 return r10_bio; 66 return r10_bio;