[PATCH 38/49] fs/jffs2: Use vzalloc
Joe Perches
joe at perches.com
Thu Nov 4 23:08:02 EDT 2010
Signed-off-by: Joe Perches <joe at perches.com>
---
fs/jffs2/build.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c
index 85c6be2..3005ec4 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;
--
1.7.3.1.g432b3.dirty
More information about the linux-mtd
mailing list