summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2016-01-29 21:36:35 +0800
committerDavid Sterba <dsterba@suse.com>2016-02-18 11:46:03 +0100
commit5598e9005a4076d6700bbd89d0cdbe5b2922a846 (patch)
treef0d5eb3931d5c990d23dabc39458248cbda6fbe2 /fs/btrfs/extent_io.c
parent89771cc98c5a4e8666e479dde171ffb52c6fa774 (diff)
downloadop-kernel-dev-5598e9005a4076d6700bbd89d0cdbe5b2922a846.zip
op-kernel-dev-5598e9005a4076d6700bbd89d0cdbe5b2922a846.tar.gz
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/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index f3910ac..96d24d0 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -206,10 +206,8 @@ void extent_io_exit(void)
* destroy caches.
*/
rcu_barrier();
- if (extent_state_cache)
- kmem_cache_destroy(extent_state_cache);
- if (extent_buffer_cache)
- kmem_cache_destroy(extent_buffer_cache);
+ kmem_cache_destroy(extent_state_cache);
+ kmem_cache_destroy(extent_buffer_cache);
if (btrfs_bioset)
bioset_free(btrfs_bioset);
}
OpenPOWER on IntegriCloud