aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
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;