Skip to content

Commit

Permalink
btrfs: make read_block_group_item return void
Browse files Browse the repository at this point in the history
Since it's inclusion on 9afc664 ("btrfs: block-group: refactor how
we read one block group item") this function always returned 0, so there
is no need to check for the returned value.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Marcos Paulo de Souza authored and David Sterba committed Oct 7, 2020
1 parent 2464648 commit 4c448ce
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions fs/btrfs/block-group.c
Original file line number Diff line number Diff line change
Expand Up @@ -1873,7 +1873,7 @@ static int check_chunk_block_group_mappings(struct btrfs_fs_info *fs_info)
return ret;
}

static int read_block_group_item(struct btrfs_block_group *cache,
static void read_block_group_item(struct btrfs_block_group *cache,
struct btrfs_path *path,
const struct btrfs_key *key)
{
Expand All @@ -1887,8 +1887,6 @@ static int read_block_group_item(struct btrfs_block_group *cache,
sizeof(bgi));
cache->used = btrfs_stack_block_group_used(&bgi);
cache->flags = btrfs_stack_block_group_flags(&bgi);

return 0;
}

static int read_one_block_group(struct btrfs_fs_info *info,
Expand All @@ -1907,9 +1905,7 @@ static int read_one_block_group(struct btrfs_fs_info *info,
if (!cache)
return -ENOMEM;

ret = read_block_group_item(cache, path, key);
if (ret < 0)
goto error;
read_block_group_item(cache, path, key);

set_free_space_tree_thresholds(cache);

Expand Down

0 comments on commit 4c448ce

Please sign in to comment.