From: Fabian Frederick Date: Wed, 6 Aug 2014 23:04:01 +0000 (-0700) Subject: fs/ocfs2/slot_map.c: replace count*size kzalloc by kcalloc X-Git-Tag: firefly_0821_release~176^2~3462^2~207 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1b7f8ba603d3bb2f5bbb65df981ae0d0abb80ee2;p=firefly-linux-kernel-4.4.55.git fs/ocfs2/slot_map.c: replace count*size kzalloc by kcalloc kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ocfs2/slot_map.c b/fs/ocfs2/slot_map.c index 1424c151cccc..a88b2a4fcc85 100644 --- a/fs/ocfs2/slot_map.c +++ b/fs/ocfs2/slot_map.c @@ -382,7 +382,7 @@ static int ocfs2_map_slot_buffers(struct ocfs2_super *osb, trace_ocfs2_map_slot_buffers(bytes, si->si_blocks); - si->si_bh = kzalloc(sizeof(struct buffer_head *) * si->si_blocks, + si->si_bh = kcalloc(si->si_blocks, sizeof(struct buffer_head *), GFP_KERNEL); if (!si->si_bh) { status = -ENOMEM;