aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-26 11:03:32 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:02 -0400
commit3bf3d9e9c256e1a249a47bb8ceff682e6430aeff (patch)
tree8caf8e63b3c053f92b0a61a83e1bf8f8186e3b7a /fs/btrfs/extent-tree.c
parent8f18cf13396caae5a3d7ae91201cfb15181a9642 (diff)
Btrfs: Avoid recursive chunk allocations
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 6540095544e..a589912fdd5 100644
--- a/fs/btrfs/extent-tree.c
+++ b/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,