Btrfs: Fix snapshot deletion to release the alloc_mutex much more often.

This lowers the impact of snapshot deletion on the rest of the FS.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason
2008-06-25 16:01:30 -04:00
parent 5cd57b2cbb
commit 333db94cdd
3 changed files with 23 additions and 9 deletions

View File

@@ -1255,7 +1255,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
lowest_level = p->lowest_level;
WARN_ON(lowest_level && ins_len);
WARN_ON(p->nodes[0] != NULL);
WARN_ON(root == root->fs_info->extent_root &&
WARN_ON(cow && root == root->fs_info->extent_root &&
!mutex_is_locked(&root->fs_info->alloc_mutex));
WARN_ON(root == root->fs_info->chunk_root &&
!mutex_is_locked(&root->fs_info->chunk_mutex));