Commit 4c448ce8 authored by Marcos Paulo de Souza's avatar Marcos Paulo de Souza Committed by David Sterba

btrfs: make read_block_group_item return void

Since it's inclusion on 9afc6649 ("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: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarMarcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 24646481
...@@ -1873,7 +1873,7 @@ static int check_chunk_block_group_mappings(struct btrfs_fs_info *fs_info) ...@@ -1873,7 +1873,7 @@ static int check_chunk_block_group_mappings(struct btrfs_fs_info *fs_info)
return ret; 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, struct btrfs_path *path,
const struct btrfs_key *key) const struct btrfs_key *key)
{ {
...@@ -1887,8 +1887,6 @@ static int read_block_group_item(struct btrfs_block_group *cache, ...@@ -1887,8 +1887,6 @@ static int read_block_group_item(struct btrfs_block_group *cache,
sizeof(bgi)); sizeof(bgi));
cache->used = btrfs_stack_block_group_used(&bgi); cache->used = btrfs_stack_block_group_used(&bgi);
cache->flags = btrfs_stack_block_group_flags(&bgi); cache->flags = btrfs_stack_block_group_flags(&bgi);
return 0;
} }
static int read_one_block_group(struct btrfs_fs_info *info, static int read_one_block_group(struct btrfs_fs_info *info,
...@@ -1907,9 +1905,7 @@ static int read_one_block_group(struct btrfs_fs_info *info, ...@@ -1907,9 +1905,7 @@ static int read_one_block_group(struct btrfs_fs_info *info,
if (!cache) if (!cache)
return -ENOMEM; return -ENOMEM;
ret = read_block_group_item(cache, path, key); read_block_group_item(cache, path, key);
if (ret < 0)
goto error;
set_free_space_tree_thresholds(cache); set_free_space_tree_thresholds(cache);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment