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) ...@@ -1807,13 +1807,25 @@ init_jffs_fs(void)
#ifdef CONFIG_JFFS_PROC_FS #ifdef CONFIG_JFFS_PROC_FS
jffs_proc_root = proc_mkdir("jffs", proc_root_fs); jffs_proc_root = proc_mkdir("jffs", proc_root_fs);
if (!jffs_proc_root) {
printk(KERN_WARNING "cannot create /proc/jffs entry\n");
}
#endif #endif
fm_cache = kmem_cache_create("jffs_fm", sizeof(struct jffs_fm), fm_cache = kmem_cache_create("jffs_fm", sizeof(struct jffs_fm),
0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
NULL, NULL); NULL, NULL);
if (!fm_cache) {
return -ENOMEM;
}
node_cache = kmem_cache_create("jffs_node",sizeof(struct jffs_node), node_cache = kmem_cache_create("jffs_node",sizeof(struct jffs_node),
0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT, 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
NULL, NULL); NULL, NULL);
if (!node_cache) {
kmem_cache_destroy(fm_cache);
return -ENOMEM;
}
return register_filesystem(&jffs_fs_type); 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