Commit a30bfc8e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] From: "Randy.Dunlap" <rddunlap@osdl.org>

From: <WHarms@bfs.de>(Walter Harms)

Hi list,
while checking 2.6.1 for missing checks(). fs/jffs/inode-v23.c
got overlooked somehow.

This patch fixes:
2 unguarded kmem_cache_create
1 unguarded proc_mkdir
parent 8a65e057
......@@ -1807,13 +1807,25 @@ init_jffs_fs(void)
#ifdef CONFIG_JFFS_PROC_FS
jffs_proc_root = proc_mkdir("jffs", proc_root_fs);
if (!jffs_proc_root) {
printk(KERN_WARNING "cannot create /proc/jffs entry\n");
}
#endif
fm_cache = kmem_cache_create("jffs_fm", sizeof(struct jffs_fm),
0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
NULL, NULL);
if (!fm_cache) {
return -ENOMEM;
}
node_cache = kmem_cache_create("jffs_node",sizeof(struct jffs_node),
0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
NULL, NULL);
if (!node_cache) {
kmem_cache_destroy(fm_cache);
return -ENOMEM;
}
return register_filesystem(&jffs_fs_type);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment