diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2016-01-29 21:36:35 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-02-18 11:46:03 +0100 |
commit | 5598e9005a4076d6700bbd89d0cdbe5b2922a846 (patch) | |
tree | f0d5eb3931d5c990d23dabc39458248cbda6fbe2 /fs/btrfs/inode.c | |
parent | 89771cc98c5a4e8666e479dde171ffb52c6fa774 (diff) | |
download | linux-5598e9005a4076d6700bbd89d0cdbe5b2922a846.tar.gz linux-5598e9005a4076d6700bbd89d0cdbe5b2922a846.tar.bz2 linux-5598e9005a4076d6700bbd89d0cdbe5b2922a846.zip |
btrfs: drop null testing before destroy functions
Cleanup.
kmem_cache_destroy has support NULL argument checking,
so drop the double null testing before calling it.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index cf0b3795364a..f067c77425bd 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9178,16 +9178,11 @@ void btrfs_destroy_cachep(void) * destroy cache. */ rcu_barrier(); - if (btrfs_inode_cachep) - kmem_cache_destroy(btrfs_inode_cachep); - if (btrfs_trans_handle_cachep) - kmem_cache_destroy(btrfs_trans_handle_cachep); - if (btrfs_transaction_cachep) - kmem_cache_destroy(btrfs_transaction_cachep); - if (btrfs_path_cachep) - kmem_cache_destroy(btrfs_path_cachep); - if (btrfs_free_space_cachep) - kmem_cache_destroy(btrfs_free_space_cachep); + kmem_cache_destroy(btrfs_inode_cachep); + kmem_cache_destroy(btrfs_trans_handle_cachep); + kmem_cache_destroy(btrfs_transaction_cachep); + kmem_cache_destroy(btrfs_path_cachep); + kmem_cache_destroy(btrfs_free_space_cachep); } int btrfs_init_cachep(void) |