From: Li Zefan Date: Mon, 25 Apr 2011 23:43:52 +0000 (-0400) Subject: Btrfs: Free free_space item properly in btrfs_trim_block_group() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f789b684bdb96e7ec2fce79445555d4fd55fb94c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git Btrfs: Free free_space item properly in btrfs_trim_block_group() Since commit dc89e9824464e91fa0b06267864ceabe3186fd8b, we've changed to use a specific slab for alocation of free_space items. Signed-off-by: Li Zefan Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c index 11d2e9cea09e..13c29b12a213 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -2301,7 +2301,7 @@ int btrfs_trim_block_group(struct btrfs_block_group_cache *block_group, start = entry->offset; bytes = min(entry->bytes, end - start); unlink_free_space(block_group, entry); - kfree(entry); + kmem_cache_free(btrfs_free_space_cachep, entry); } spin_unlock(&block_group->tree_lock);