From: Chris Mason Date: Sat, 26 Apr 2008 15:03:32 +0000 (-0400) Subject: Btrfs: Avoid recursive chunk allocations X-Git-Tag: v2.6.29-rc2~3^2~11^2~55^2~56^2~30^2~196 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3bf3d9e9c256e1a249a47bb8ceff682e6430aeff;p=profile%2Fivi%2Fkernel-x86-ivi.git Btrfs: Avoid recursive chunk allocations Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 6540095..a589912 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,