提交 70b7da30 编写于 作者: L Li Zefan

btrfs: Free fully occupied bitmap in cluster

If there's no more free space in a bitmap, we should free it.
Reviewed-by: NJosef Bacik <josef@redhat.com>
Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
上级 edf6e2d1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册