|
@@ -1768,12 +1768,9 @@ static int ocfs2_initialize_mem_caches(void)
|
|
|
NULL);
|
|
|
if (!ocfs2_inode_cachep || !ocfs2_dquot_cachep ||
|
|
|
!ocfs2_qf_chunk_cachep) {
|
|
|
- if (ocfs2_inode_cachep)
|
|
|
- kmem_cache_destroy(ocfs2_inode_cachep);
|
|
|
- if (ocfs2_dquot_cachep)
|
|
|
- kmem_cache_destroy(ocfs2_dquot_cachep);
|
|
|
- if (ocfs2_qf_chunk_cachep)
|
|
|
- kmem_cache_destroy(ocfs2_qf_chunk_cachep);
|
|
|
+ kmem_cache_destroy(ocfs2_inode_cachep);
|
|
|
+ kmem_cache_destroy(ocfs2_dquot_cachep);
|
|
|
+ kmem_cache_destroy(ocfs2_qf_chunk_cachep);
|
|
|
return -ENOMEM;
|
|
|
}
|
|
|
|
|
@@ -1787,16 +1784,13 @@ static void ocfs2_free_mem_caches(void)
|
|
|
* destroy cache.
|
|
|
*/
|
|
|
rcu_barrier();
|
|
|
- if (ocfs2_inode_cachep)
|
|
|
- kmem_cache_destroy(ocfs2_inode_cachep);
|
|
|
+ kmem_cache_destroy(ocfs2_inode_cachep);
|
|
|
ocfs2_inode_cachep = NULL;
|
|
|
|
|
|
- if (ocfs2_dquot_cachep)
|
|
|
- kmem_cache_destroy(ocfs2_dquot_cachep);
|
|
|
+ kmem_cache_destroy(ocfs2_dquot_cachep);
|
|
|
ocfs2_dquot_cachep = NULL;
|
|
|
|
|
|
- if (ocfs2_qf_chunk_cachep)
|
|
|
- kmem_cache_destroy(ocfs2_qf_chunk_cachep);
|
|
|
+ kmem_cache_destroy(ocfs2_qf_chunk_cachep);
|
|
|
ocfs2_qf_chunk_cachep = NULL;
|
|
|
}
|
|
|
|