summaryrefslogtreecommitdiff
path: root/fs/adfs/dir_fplus.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-08-08 14:22:24 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-08 15:57:24 -0700
commitb16214d43d9060722360360f741416660b54c4f5 (patch)
treec198658e424c4211c75b7273da40679a51e2d28f /fs/adfs/dir_fplus.c
parente2ffcf5c7ee7eb979b1f2375404668a2f5076c1b (diff)
downloadlwn-b16214d43d9060722360360f741416660b54c4f5.tar.gz
lwn-b16214d43d9060722360360f741416660b54c4f5.zip
fs/adfs/dir_fplus.c: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/adfs/dir_fplus.c')
-rw-r--r--fs/adfs/dir_fplus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/adfs/dir_fplus.c b/fs/adfs/dir_fplus.c
index 7673c1fdbfc0..c52f1ce15f1e 100644
--- a/fs/adfs/dir_fplus.c
+++ b/fs/adfs/dir_fplus.c
@@ -58,7 +58,7 @@ adfs_fplus_read(struct super_block *sb, unsigned int id, unsigned int sz, struct
if (size > ARRAY_SIZE(dir->bh)) {
/* this directory is too big for fixed bh set, must allocate */
struct buffer_head **bh_fplus =
- kzalloc(size * sizeof(struct buffer_head *),
+ kcalloc(size, sizeof(struct buffer_head *),
GFP_KERNEL);
if (!bh_fplus) {
adfs_error(sb, "not enough memory for"