Skip to content

Commit

Permalink
Btrfs: Free free_space item properly in btrfs_trim_block_group()
Browse files Browse the repository at this point in the history
Since commit dc89e98, we've changed
to use a specific slab for alocation of free_space items.

Signed-off-by: Li Zefan <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
Li Zefan authored and chrismason-xx committed Apr 25, 2011
1 parent cfece4d commit f789b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f789b68

Please sign in to comment.