summaryrefslogtreecommitdiffstats
path: root/fs/jffs2
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-04 20:08:02 -0700
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-12-03 16:27:34 +0000
commit7ddbead6e6d3c730570a215ab9a6b1d126c54d34 (patch)
tree75796cc72f06620d768d733cd4f5478d573cc9c3 /fs/jffs2
parent309b5e4e4154721f8079bc250d2233fd4b3aa039 (diff)
downloadlinux-7ddbead6e6d3c730570a215ab9a6b1d126c54d34.tar.gz
linux-7ddbead6e6d3c730570a215ab9a6b1d126c54d34.tar.bz2
linux-7ddbead6e6d3c730570a215ab9a6b1d126c54d34.zip
jffs2: use vzalloc
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2')
-rw-r--r--fs/jffs2/build.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c
index 85c6be2db02f..3005ec4520ad 100644
--- a/fs/jffs2/build.c
+++ b/fs/jffs2/build.c
@@ -336,14 +336,13 @@ int jffs2_do_mount_fs(struct jffs2_sb_info *c)
size = sizeof(struct jffs2_eraseblock) * c->nr_blocks;
#ifndef __ECOS
if (jffs2_blocks_use_vmalloc(c))
- c->blocks = vmalloc(size);
+ c->blocks = vzalloc(size);
else
#endif
- c->blocks = kmalloc(size, GFP_KERNEL);
+ c->blocks = kzalloc(size, GFP_KERNEL);
if (!c->blocks)
return -ENOMEM;
- memset(c->blocks, 0, size);
for (i=0; i<c->nr_blocks; i++) {
INIT_LIST_HEAD(&c->blocks[i].list);
c->blocks[i].offset = i * c->sector_size;