diff options
author | Marcos Paulo de Souza <mpdesouza@suse.com> | 2020-08-17 10:56:10 -0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:06:56 +0200 |
commit | 4c448ce8b48fb65536c903f1ed8a80554838508e (patch) | |
tree | 51413390f5f7785f11d417a3d590752eeb4dbd75 /fs/btrfs/block-group.c | |
parent | 24646481fb19a3bd86933ec30480454381ff9860 (diff) | |
download | lwn-4c448ce8b48fb65536c903f1ed8a80554838508e.tar.gz lwn-4c448ce8b48fb65536c903f1ed8a80554838508e.zip |
btrfs: make read_block_group_item return void
Since it's inclusion on 9afc66498a0b ("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>
Diffstat (limited to 'fs/btrfs/block-group.c')
-rw-r--r-- | fs/btrfs/block-group.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index c9d7465501a4..01e8ba1da1d3 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -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) { @@ -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, @@ -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); |