aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-defrag.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/tree-defrag.c')
-rw-r--r--fs/btrfs/tree-defrag.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/tree-defrag.c b/fs/btrfs/tree-defrag.c
index 1677e4edaf6f..b17693f61fbc 100644
--- a/fs/btrfs/tree-defrag.c
+++ b/fs/btrfs/tree-defrag.c
@@ -38,8 +38,15 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
38 u64 last_ret = 0; 38 u64 last_ret = 0;
39 39
40 if (root->fs_info->extent_root == root) { 40 if (root->fs_info->extent_root == root) {
41 /*
42 * there's recursion here right now in the tree locking,
43 * we can't defrag the extent root without deadlock
44 */
45 goto out;
46#if 0
41 mutex_lock(&root->fs_info->alloc_mutex); 47 mutex_lock(&root->fs_info->alloc_mutex);
42 is_extent = 1; 48 is_extent = 1;
49#endif
43 } 50 }
44 51
45 if (root->ref_cows == 0 && !is_extent) 52 if (root->ref_cows == 0 && !is_extent)