]> git.baikalelectronics.ru Git - kernel.git/commit
jbd2: remove NULL check before calling kmem_cache_destroy()
authorWang Long <wanglong19@meituan.com>
Mon, 21 May 2018 02:38:26 +0000 (22:38 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 21 May 2018 02:38:26 +0000 (22:38 -0400)
commit4f473a64fa5bbd0c32642d844ee13e60eee4add9
treef7b345a2e9844b29a67c285d482b61ac1a5e1781
parent23d17b6d11afd144c96e50a575d84524d19ccfd8
jbd2: remove NULL check before calling kmem_cache_destroy()

The kmem_cache_destroy() function already checks for null pointers, so
we can remove the check at the call site.

This patch also sets jbd2_handle_cache and jbd2_inode_cache to be NULL
after freeing them in jbd2_journal_destroy_handle_cache().

Signed-off-by: Wang Long <wanglong19@meituan.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/jbd2/journal.c
fs/jbd2/revoke.c
fs/jbd2/transaction.c