aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-08-06 19:04:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 21:01:13 -0400
commit1b7f8ba603d3bb2f5bbb65df981ae0d0abb80ee2 (patch)
treea172b632b35c820d86d1bd3ad5e4b5b48d76a9c8 /fs/ocfs2
parentbba1cb17d9adb8c074f138c1cc039fb2ee8c964c (diff)
fs/ocfs2/slot_map.c: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/slot_map.c2
1 files changed, 1 insertions, 1 deletions
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,
382 382
383 trace_ocfs2_map_slot_buffers(bytes, si->si_blocks); 383 trace_ocfs2_map_slot_buffers(bytes, si->si_blocks);
384 384
385 si->si_bh = kzalloc(sizeof(struct buffer_head *) * si->si_blocks, 385 si->si_bh = kcalloc(si->si_blocks, sizeof(struct buffer_head *),
386 GFP_KERNEL); 386 GFP_KERNEL);
387 if (!si->si_bh) { 387 if (!si->si_bh) {
388 status = -ENOMEM; 388 status = -ENOMEM;