summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorKinglong Mee2016-01-29 14:36:35 +0100
committerDavid Sterba2016-02-18 11:46:03 +0100
commit5598e9005a4076d6700bbd89d0cdbe5b2922a846 (patch)
treef0d5eb3931d5c990d23dabc39458248cbda6fbe2 /fs/btrfs/file.c
parentbtrfs: fix build warning (diff)
downloadkernel-qcow2-linux-5598e9005a4076d6700bbd89d0cdbe5b2922a846.tar.gz
kernel-qcow2-linux-5598e9005a4076d6700bbd89d0cdbe5b2922a846.tar.xz
kernel-qcow2-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/file.c')
-rw-r--r--fs/btrfs/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 610f56992464..b387fb53a880 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2939,8 +2939,7 @@ const struct file_operations btrfs_file_operations = {
void btrfs_auto_defrag_exit(void)
{
- if (btrfs_inode_defrag_cachep)
- kmem_cache_destroy(btrfs_inode_defrag_cachep);
+ kmem_cache_destroy(btrfs_inode_defrag_cachep);
}
int btrfs_auto_defrag_init(void)