diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 809c2c307c6482dba664ab7d193f4cc0ccfa9921..6d155d7d439d98a3de737ebf3e8da96e26a0bf06 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3911,8 +3911,7 @@ static int create_space_info(struct btrfs_fs_info *info, u64 flags) info->space_info_kobj, "%s", alloc_name(space_info->flags)); if (ret) { - percpu_counter_destroy(&space_info->total_bytes_pinned); - kfree(space_info); + kobject_put(&space_info->kobj); return ret; }