aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/fs.c')
-rw-r--r--fs/jffs2/fs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index 7bc1a4201c0c..abb90c0c09cc 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -502,12 +502,11 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
502 if (ret) 502 if (ret)
503 return ret; 503 return ret;
504 504
505 c->inocache_list = kmalloc(INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *), GFP_KERNEL); 505 c->inocache_list = kcalloc(INOCACHE_HASHSIZE, sizeof(struct jffs2_inode_cache *), GFP_KERNEL);
506 if (!c->inocache_list) { 506 if (!c->inocache_list) {
507 ret = -ENOMEM; 507 ret = -ENOMEM;
508 goto out_wbuf; 508 goto out_wbuf;
509 } 509 }
510 memset(c->inocache_list, 0, INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *));
511 510
512 jffs2_init_xattr_subsystem(c); 511 jffs2_init_xattr_subsystem(c);
513 512