ext4: remove NULL check before calling kmem_cache_destroy()

Signed-off-by: Sean Fu <fxinrong@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
Sean Fu 2018-05-20 22:44:13 -04:00 committed by Theodore Ts'o
parent 8bdd5b60e0
commit 21c580d88e
2 changed files with 2 additions and 4 deletions

View file

@ -162,8 +162,7 @@ int __init ext4_init_es(void)
void ext4_exit_es(void)
{
if (ext4_es_cachep)
kmem_cache_destroy(ext4_es_cachep);
kmem_cache_destroy(ext4_es_cachep);
}
void ext4_es_init_tree(struct ext4_es_tree *tree)

View file

@ -2537,8 +2537,7 @@ static void ext4_groupinfo_destroy_slabs(void)
int i;
for (i = 0; i < NR_GRPINFO_CACHES; i++) {
if (ext4_groupinfo_caches[i])
kmem_cache_destroy(ext4_groupinfo_caches[i]);
kmem_cache_destroy(ext4_groupinfo_caches[i]);
ext4_groupinfo_caches[i] = NULL;
}
}