浏览代码

Btrfs: Avoid recursive chunk allocations

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason 17 年之前
父节点
当前提交
3bf3d9e9c2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/btrfs/extent-tree.c

+ 1 - 1
fs/btrfs/extent-tree.c

@@ -1727,7 +1727,7 @@ int btrfs_alloc_extent(struct btrfs_trans_handle *trans,
 		data = BTRFS_BLOCK_GROUP_METADATA | alloc_profile;
 	}
 again:
-	if (root != root->fs_info->extent_root) {
+	if (root->ref_cows) {
 		if (!(data & BTRFS_BLOCK_GROUP_METADATA)) {
 			ret = do_chunk_alloc(trans, root->fs_info->extent_root,
 					     2 * 1024 * 1024,