1 ext4: remove NULL check before calling kmem_cache_destroy()
3 From: Sean Fu <fxinrong@gmail.com>
5 Signed-off-by: Sean Fu <fxinrong@gmail.com>
6 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
8 fs/ext4/extents_status.c | 3 +--
9 fs/ext4/mballoc.c | 3 +--
10 2 files changed, 2 insertions(+), 4 deletions(-)
12 diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
13 index 763ef18..c4e6fb1 100644
14 --- a/fs/ext4/extents_status.c
15 +++ b/fs/ext4/extents_status.c
16 @@ -162,8 +162,7 @@ int __init ext4_init_es(void)
18 void ext4_exit_es(void)
21 - kmem_cache_destroy(ext4_es_cachep);
22 + kmem_cache_destroy(ext4_es_cachep);
25 void ext4_es_init_tree(struct ext4_es_tree *tree)
26 diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
27 index d9f8b90a..4fd1349 100644
28 --- a/fs/ext4/mballoc.c
29 +++ b/fs/ext4/mballoc.c
30 @@ -2549,8 +2549,7 @@ static void ext4_groupinfo_destroy_slabs(void)
33 for (i = 0; i < NR_GRPINFO_CACHES; i++) {
34 - if (ext4_groupinfo_caches[i])
35 - kmem_cache_destroy(ext4_groupinfo_caches[i]);
36 + kmem_cache_destroy(ext4_groupinfo_caches[i]);
37 ext4_groupinfo_caches[i] = NULL;