diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-06-30 17:03:50 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 14:52:13 +0200 |
commit | b1c8f527feb858927f50a136d13196f107c63631 (patch) | |
tree | 0cab8e411381d81758dd54407beef4fb8635324f /fs/btrfs/extent-tree.c | |
parent | btrfs: make find_first_extent_bit() return a boolean (diff) | |
download | linux-b1c8f527feb858927f50a136d13196f107c63631.tar.xz linux-b1c8f527feb858927f50a136d13196f107c63631.zip |
btrfs: open code trivial btrfs_add_excluded_extent()
The code for btrfs_add_excluded_extent() is trivial, it's just a
set_extent_bit() call. However it's defined in extent-tree.c but it is
only used (twice) in block-group.c. So open code it in block-group.c,
reducing the need to export a trivial function.
Also since the only caller btrfs_add_excluded_extent() is prepared to
deal with errors, stop ignoring errors from the set_extent_bit() call.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index ab7b588baa7e..1a0fb156f602 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -69,15 +69,6 @@ static int block_group_bits(struct btrfs_block_group *cache, u64 bits) return (cache->flags & bits) == bits; } -int btrfs_add_excluded_extent(struct btrfs_fs_info *fs_info, - u64 start, u64 num_bytes) -{ - u64 end = start + num_bytes - 1; - set_extent_bit(&fs_info->excluded_extents, start, end, - EXTENT_UPTODATE, NULL); - return 0; -} - void btrfs_free_excluded_extents(struct btrfs_block_group *cache) { struct btrfs_fs_info *fs_info = cache->fs_info; |