提交 e1305df1 编写于 作者: J Julia Lawall 提交者: Brian Norris

jffs2: drop null test before destroy functions

Remove unneeded NULL test.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@ expression x; @@
-if (x != NULL)
  \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x);
// </smpl>
Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NBrian Norris <computersforpeace@gmail.com>
上级 0791a5f8
......@@ -97,25 +97,16 @@ int __init jffs2_create_slab_caches(void)
void jffs2_destroy_slab_caches(void)
{
if(full_dnode_slab)
kmem_cache_destroy(full_dnode_slab);
if(raw_dirent_slab)
kmem_cache_destroy(raw_dirent_slab);
if(raw_inode_slab)
kmem_cache_destroy(raw_inode_slab);
if(tmp_dnode_info_slab)
kmem_cache_destroy(tmp_dnode_info_slab);
if(raw_node_ref_slab)
kmem_cache_destroy(raw_node_ref_slab);
if(node_frag_slab)
kmem_cache_destroy(node_frag_slab);
if(inode_cache_slab)
kmem_cache_destroy(inode_cache_slab);
kmem_cache_destroy(full_dnode_slab);
kmem_cache_destroy(raw_dirent_slab);
kmem_cache_destroy(raw_inode_slab);
kmem_cache_destroy(tmp_dnode_info_slab);
kmem_cache_destroy(raw_node_ref_slab);
kmem_cache_destroy(node_frag_slab);
kmem_cache_destroy(inode_cache_slab);
#ifdef CONFIG_JFFS2_FS_XATTR
if (xattr_datum_cache)
kmem_cache_destroy(xattr_datum_cache);
if (xattr_ref_cache)
kmem_cache_destroy(xattr_ref_cache);
kmem_cache_destroy(xattr_datum_cache);
kmem_cache_destroy(xattr_ref_cache);
#endif
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册