Btrfs: free space accounting redo
[linux-2.6-block.git] / fs / btrfs / disk-io.c
index f6f7821d43a5248478c0f5ccfa1bcb97c6e22410..535bd0fe1a7138a830e5e965ed566cffd25b4167 100644 (file)
@@ -1410,10 +1410,9 @@ struct btrfs_root *open_ctree(struct super_block *sb,
 
        BTRFS_I(fs_info->btree_inode)->io_tree.ops = &btree_extent_io_ops;
 
-       extent_io_tree_init(&fs_info->free_space_cache,
-                            fs_info->btree_inode->i_mapping, GFP_NOFS);
-       extent_io_tree_init(&fs_info->block_group_cache,
-                            fs_info->btree_inode->i_mapping, GFP_NOFS);
+       spin_lock_init(&fs_info->block_group_cache_lock);
+       fs_info->block_group_cache_tree.rb_node = NULL;
+
        extent_io_tree_init(&fs_info->pinned_extents,
                             fs_info->btree_inode->i_mapping, GFP_NOFS);
        extent_io_tree_init(&fs_info->pending_del,