}
 
 static int btrfs_free_chunk(struct btrfs_trans_handle *trans,
-                           struct btrfs_fs_info *fs_info, u64 chunk_objectid,
-                           u64 chunk_offset)
+                           struct btrfs_fs_info *fs_info, u64 chunk_offset)
 {
        struct btrfs_root *root = fs_info->chunk_root;
        int ret;
        if (!path)
                return -ENOMEM;
 
-       key.objectid = chunk_objectid;
+       key.objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID;
        key.offset = chunk_offset;
        key.type = BTRFS_CHUNK_ITEM_KEY;
 
        return ret;
 }
 
-static int btrfs_del_sys_chunk(struct btrfs_fs_info *fs_info,
-                              u64 chunk_objectid, u64 chunk_offset)
+static int btrfs_del_sys_chunk(struct btrfs_fs_info *fs_info, u64 chunk_offset)
 {
        struct btrfs_super_block *super_copy = fs_info->super_copy;
        struct btrfs_disk_key *disk_key;
                        ret = -EIO;
                        break;
                }
-               if (key.objectid == chunk_objectid &&
+               if (key.objectid == BTRFS_FIRST_CHUNK_TREE_OBJECTID &&
                    key.offset == chunk_offset) {
                        memmove(ptr, ptr + len, array_size - (cur + len));
                        array_size -= len;
        struct extent_map *em;
        struct map_lookup *map;
        u64 dev_extent_len = 0;
-       u64 chunk_objectid = BTRFS_FIRST_CHUNK_TREE_OBJECTID;
        int i, ret = 0;
        struct btrfs_fs_devices *fs_devices = fs_info->fs_devices;
 
        }
        mutex_unlock(&fs_devices->device_list_mutex);
 
-       ret = btrfs_free_chunk(trans, fs_info, chunk_objectid, chunk_offset);
+       ret = btrfs_free_chunk(trans, fs_info, chunk_offset);
        if (ret) {
                btrfs_abort_transaction(trans, ret);
                goto out;
        trace_btrfs_chunk_free(fs_info, map, chunk_offset, em->len);
 
        if (map->type & BTRFS_BLOCK_GROUP_SYSTEM) {
-               ret = btrfs_del_sys_chunk(fs_info, chunk_objectid,
-                                         chunk_offset);
+               ret = btrfs_del_sys_chunk(fs_info, chunk_offset);
                if (ret) {
                        btrfs_abort_transaction(trans, ret);
                        goto out;