diff options
author | Qu Wenruo <wqu@suse.com> | 2018-01-24 10:30:28 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-31 15:14:03 +0100 |
commit | 1945854e012b9e8b720f826f90158f339101cf4b (patch) | |
tree | 1e3dbba5476320213e8a99c296327617874c83d0 /cmds-check.c | |
parent | e4df433b8a2d5ef944ab4764a5ad237bcdbd1fdc (diff) |
btrfs-progs: Remove unnecessary parameter for btrfs_add_block_group
@chunk_objectid of btrfs_make_block_group() function is always fixed to
BTRFS_FIRST_FREE_OBJECTID, so there is no need to pass it as parameter
explicitly.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-check.c')
-rw-r--r-- | cmds-check.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmds-check.c b/cmds-check.c index 5fc0ea9d..99fbafc5 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -13088,7 +13088,7 @@ static int repair_chunk_item(struct btrfs_trans_handle *trans, if (err & REFERENCER_MISSING) { ret = btrfs_make_block_group(trans, chunk_root->fs_info, 0, - type, chunk_key.objectid, chunk_key.offset, length); + type, chunk_key.offset, length); if (ret) { error("fail to add block group item[%llu %llu]", chunk_key.offset, length); @@ -13680,8 +13680,7 @@ static int reset_block_groups(struct btrfs_fs_info *fs_info) chunk = btrfs_item_ptr(leaf, path.slots[0], struct btrfs_chunk); btrfs_add_block_group(fs_info, 0, - btrfs_chunk_type(leaf, chunk), - key.objectid, key.offset, + btrfs_chunk_type(leaf, chunk), key.offset, btrfs_chunk_length(leaf, chunk)); set_extent_dirty(&fs_info->free_space_cache, key.offset, key.offset + btrfs_chunk_length(leaf, chunk)); |