mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
btrfs: Free fully occupied bitmap in cluster
If there's no more free space in a bitmap, we should free it. Reviewed-by: Josef Bacik <josef@redhat.com> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
This commit is contained in:
parent
edf6e2d1dd
commit
70b7da304f
1 changed files with 2 additions and 0 deletions
|
@ -1788,6 +1788,8 @@ static u64 btrfs_alloc_from_bitmap(struct btrfs_block_group_cache *block_group,
|
|||
|
||||
ret = search_start;
|
||||
bitmap_clear_bits(block_group, entry, ret, bytes);
|
||||
if (entry->bytes == 0)
|
||||
free_bitmap(block_group, entry);
|
||||
out:
|
||||
spin_unlock(&cluster->lock);
|
||||
spin_unlock(&block_group->tree_lock);
|
||||
|
|
Loading…
Reference in a new issue