btrfs: Remove special handling of EXTENT_BUFFER_UNMAPPED while freeing
[sfrench/cifs-2.6.git] / fs / btrfs / tests / btrfs-tests.c
index db72b3b6209e000e8d4a1a94507ed9185715dd28..4cb8fcfd3ec41e822727b5db56fdd3964f2cd582 100644 (file)
@@ -174,8 +174,12 @@ void btrfs_free_dummy_root(struct btrfs_root *root)
        /* Will be freed by btrfs_free_fs_roots */
        if (WARN_ON(test_bit(BTRFS_ROOT_IN_RADIX, &root->state)))
                return;
        /* Will be freed by btrfs_free_fs_roots */
        if (WARN_ON(test_bit(BTRFS_ROOT_IN_RADIX, &root->state)))
                return;
-       if (root->node)
+       if (root->node) {
+               /* One for allocate_extent_buffer */
                free_extent_buffer(root->node);
                free_extent_buffer(root->node);
+               /* One for get_exent_buffer */
+               free_extent_buffer(root->node);
+       }
        kfree(root);
 }
 
        kfree(root);
 }