btrfs: move btrfs_free_excluded_extents() into block-group.c
The function btrfs_free_excluded_extents() is only used by block-group.c, so move it into block-group.c and make it static. Also removed unnecessary variables that are used only once. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
b1c8f527fe
commit
98b5a8fd2a
@ -835,6 +835,12 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void btrfs_free_excluded_extents(const struct btrfs_block_group *bg)
|
||||
{
|
||||
clear_extent_bits(&bg->fs_info->excluded_extents, bg->start,
|
||||
bg->start + bg->length - 1, EXTENT_UPTODATE);
|
||||
}
|
||||
|
||||
static noinline void caching_thread(struct btrfs_work *work)
|
||||
{
|
||||
struct btrfs_block_group *block_group;
|
||||
|
@ -69,18 +69,6 @@ static int block_group_bits(struct btrfs_block_group *cache, u64 bits)
|
||||
return (cache->flags & bits) == bits;
|
||||
}
|
||||
|
||||
void btrfs_free_excluded_extents(struct btrfs_block_group *cache)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info = cache->fs_info;
|
||||
u64 start, end;
|
||||
|
||||
start = cache->start;
|
||||
end = start + cache->length - 1;
|
||||
|
||||
clear_extent_bits(&fs_info->excluded_extents, start, end,
|
||||
EXTENT_UPTODATE);
|
||||
}
|
||||
|
||||
/* simple helper to search for an existing data extent at a given offset */
|
||||
int btrfs_lookup_data_extent(struct btrfs_fs_info *fs_info, u64 start, u64 len)
|
||||
{
|
||||
|
@ -96,7 +96,6 @@ int btrfs_get_extent_inline_ref_type(const struct extent_buffer *eb,
|
||||
enum btrfs_inline_ref_type is_data);
|
||||
u64 hash_extent_data_ref(u64 root_objectid, u64 owner, u64 offset);
|
||||
|
||||
void btrfs_free_excluded_extents(struct btrfs_block_group *cache);
|
||||
int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, unsigned long count);
|
||||
void btrfs_cleanup_ref_head_accounting(struct btrfs_fs_info *fs_info,
|
||||
struct btrfs_delayed_ref_root *delayed_refs,
|
||||
|
Loading…
Reference in New Issue
Block a user