Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45689
b: refs/heads/master
c: 3d375d9
h: refs/heads/master
i:
  45687: 1d1e680
v: v3
  • Loading branch information
Yan Burman authored and David Woodhouse committed Dec 10, 2006
1 parent 7b1e8e6 commit 99bd326
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: db06e2a93ff73270e0053c37c88073094e77913d
refs/heads/master: 3d375d9e0feee79e63a552a3eb3b46f989afce34
3 changes: 1 addition & 2 deletions trunk/fs/jffs2/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,11 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent)
if (ret)
return ret;

c->inocache_list = kmalloc(INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *), GFP_KERNEL);
c->inocache_list = kcalloc(INOCACHE_HASHSIZE, sizeof(struct jffs2_inode_cache *), GFP_KERNEL);
if (!c->inocache_list) {
ret = -ENOMEM;
goto out_wbuf;
}
memset(c->inocache_list, 0, INOCACHE_HASHSIZE * sizeof(struct jffs2_inode_cache *));

jffs2_init_xattr_subsystem(c);

Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/jffs2/readinode.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,13 +944,12 @@ int jffs2_do_read_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic)
{
struct jffs2_raw_inode n;
struct jffs2_inode_info *f = kmalloc(sizeof(*f), GFP_KERNEL);
struct jffs2_inode_info *f = kzalloc(sizeof(*f), GFP_KERNEL);
int ret;

if (!f)
return -ENOMEM;

memset(f, 0, sizeof(*f));
init_MUTEX_LOCKED(&f->sem);
f->inocache = ic;

Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/jffs2/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,11 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
}

if (jffs2_sum_active()) {
s = kmalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
if (!s) {
JFFS2_WARNING("Can't allocate memory for summary\n");
return -ENOMEM;
}
memset(s, 0, sizeof(struct jffs2_summary));
}

for (i=0; i<c->nr_blocks; i++) {
Expand Down
4 changes: 1 addition & 3 deletions trunk/fs/jffs2/summary.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@

int jffs2_sum_init(struct jffs2_sb_info *c)
{
c->summary = kmalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
c->summary = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);

if (!c->summary) {
JFFS2_WARNING("Can't allocate memory for summary information!\n");
return -ENOMEM;
}

memset(c->summary, 0, sizeof(struct jffs2_summary));

c->summary->sum_buf = vmalloc(c->sector_size);

if (!c->summary->sum_buf) {
Expand Down

0 comments on commit 99bd326

Please sign in to comment.