Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
[linux-2.6.git] / fs / btrfs / disk-io.c
index 94ecac33cf2d924ab55cff813b774c04acd285a9..07b3ac662e193e6b3a19180c3c3c9bfccbeb8028 100644 (file)
@@ -1111,12 +1111,7 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
        init_completion(&root->kobj_unregister);
        root->defrag_running = 0;
        root->root_key.objectid = objectid;
-       root->anon_super.s_root = NULL;
-       root->anon_super.s_dev = 0;
-       INIT_LIST_HEAD(&root->anon_super.s_list);
-       INIT_LIST_HEAD(&root->anon_super.s_instances);
-       init_rwsem(&root->anon_super.s_umount);
-
+       root->anon_dev = 0;
        return 0;
 }
 
@@ -1345,7 +1340,7 @@ again:
        spin_lock_init(&root->cache_lock);
        init_waitqueue_head(&root->cache_wait);
 
-       ret = set_anon_super(&root->anon_super, NULL);
+       ret = get_anon_bdev(&root->anon_dev);
        if (ret)
                goto fail;
 
@@ -2432,10 +2427,8 @@ static void free_fs_root(struct btrfs_root *root)
 {
        iput(root->cache_inode);
        WARN_ON(!RB_EMPTY_ROOT(&root->inode_tree));
-       if (root->anon_super.s_dev) {
-               down_write(&root->anon_super.s_umount);
-               kill_anon_super(&root->anon_super);
-       }
+       if (root->anon_dev)
+               free_anon_bdev(root->anon_dev);
        free_extent_buffer(root->node);
        free_extent_buffer(root->commit_root);
        kfree(root->free_ino_ctl);