diff options
author | NeilBrown <neilb@suse.de> | 2006-01-06 11:20:32 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 19:34:05 +0300 |
commit | 9ffae0cf3ea02f75d163922accfd3e592d87adde (patch) | |
tree | 4974727e9f36e1b618b68d2789644ee3a0d7a371 /drivers/md/raid10.c | |
parent | 2d1f3b5d1b2cd11a162eb29645df749ec0036413 (diff) | |
download | linux-9ffae0cf3ea02f75d163922accfd3e592d87adde.tar.xz |
[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.c | 6 |
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) int size = offsetof(struct r10bio_s, devs[conf->copies]); /* allocate a r10bio with room for raid_disks entries in the bios array */ - r10_bio = kmalloc(size, gfp_flags); - if (r10_bio) - memset(r10_bio, 0, size); - else + r10_bio = kzalloc(size, gfp_flags); + if (!r10_bio) unplug_slaves(conf->mddev); return r10_bio; |