btrfs-progs: build btrfs.static needs libbtrfsutil to build
[platform/upstream/btrfs-progs.git] / extent-tree.c
index 259460b..ea205cc 100644 (file)
@@ -1005,7 +1005,6 @@ static int lookup_inline_extent_backref(struct btrfs_trans_handle *trans,
                extra_size = -1;
 
        if (owner < BTRFS_FIRST_FREE_OBJECTID && skinny_metadata) {
-               skinny_metadata = 1;
                key.type = BTRFS_METADATA_ITEM_KEY;
                key.offset = owner;
        } else if (skinny_metadata) {
@@ -1071,7 +1070,7 @@ again:
                printf("Size is %u, needs to be %u, slot %d\n",
                       (unsigned)item_size,
                       (unsigned)sizeof(*ei), path->slots[0]);
-               btrfs_print_leaf(root, leaf);
+               btrfs_print_leaf(leaf);
                return -EINVAL;
        }
        BUG_ON(item_size < sizeof(*ei));
@@ -1588,7 +1587,7 @@ again:
        }
 
        if (ret != 0) {
-               btrfs_print_leaf(root, path->nodes[0]);
+               btrfs_print_leaf(path->nodes[0]);
                printk("failed to find block number %Lu\n",
                        (unsigned long long)bytenr);
                BUG();
@@ -1916,7 +1915,7 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans,
        BUG_ON(ret);
 
        ret = btrfs_make_block_group(trans, fs_info, 0, space_info->flags,
-                    BTRFS_FIRST_CHUNK_TREE_OBJECTID, start, num_bytes);
+                                    start, num_bytes);
        BUG_ON(ret);
        return 0;
 }
@@ -2274,7 +2273,7 @@ static int __free_extent(struct btrfs_trans_handle *trans,
                                printk(KERN_ERR "umm, got %d back from search"
                                       ", was looking for %llu\n", ret,
                                       (unsigned long long)bytenr);
-                               btrfs_print_leaf(extent_root, path->nodes[0]);
+                               btrfs_print_leaf(path->nodes[0]);
                        }
                        BUG_ON(ret);
                        extent_slot = path->slots[0];
@@ -2312,7 +2311,7 @@ static int __free_extent(struct btrfs_trans_handle *trans,
                        printk(KERN_ERR "umm, got %d back from search"
                               ", was looking for %llu\n", ret,
                               (unsigned long long)bytenr);
-                       btrfs_print_leaf(extent_root, path->nodes[0]);
+                       btrfs_print_leaf(path->nodes[0]);
                }
                BUG_ON(ret);
                extent_slot = path->slots[0];
@@ -3311,7 +3310,7 @@ error:
 
 struct btrfs_block_group_cache *
 btrfs_add_block_group(struct btrfs_fs_info *fs_info, u64 bytes_used, u64 type,
-                     u64 chunk_objectid, u64 chunk_offset, u64 size)
+                     u64 chunk_offset, u64 size)
 {
        int ret;
        int bit = 0;
@@ -3327,7 +3326,8 @@ btrfs_add_block_group(struct btrfs_fs_info *fs_info, u64 bytes_used, u64 type,
 
        cache->key.type = BTRFS_BLOCK_GROUP_ITEM_KEY;
        btrfs_set_block_group_used(&cache->item, bytes_used);
-       btrfs_set_block_group_chunk_objectid(&cache->item, chunk_objectid);
+       btrfs_set_block_group_chunk_objectid(&cache->item,
+                                            BTRFS_FIRST_CHUNK_TREE_OBJECTID);
        cache->flags = type;
        btrfs_set_block_group_flags(&cache->item, type);
 
@@ -3352,15 +3352,14 @@ btrfs_add_block_group(struct btrfs_fs_info *fs_info, u64 bytes_used, u64 type,
 
 int btrfs_make_block_group(struct btrfs_trans_handle *trans,
                           struct btrfs_fs_info *fs_info, u64 bytes_used,
-                          u64 type, u64 chunk_objectid, u64 chunk_offset,
-                          u64 size)
+                          u64 type, u64 chunk_offset, u64 size)
 {
        int ret;
        struct btrfs_root *extent_root = fs_info->extent_root;
        struct btrfs_block_group_cache *cache;
 
-       cache = btrfs_add_block_group(fs_info, bytes_used, type,
-                                     chunk_objectid, chunk_offset, size);
+       cache = btrfs_add_block_group(fs_info, bytes_used, type, chunk_offset,
+                                     size);
        ret = btrfs_insert_item(trans, extent_root, &cache->key, &cache->item,
                                sizeof(cache->item));
        BUG_ON(ret);