Skip to content

Commit

Permalink
btrfs: unexport extent_map_block_end()
Browse files Browse the repository at this point in the history
The helper extent_map_block_end() is currently not used anywhere outside
extent_map.c, so move into from extent_map.h into extent_map.c. While at
it, also make the extent map pointer argument as const.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Filipe Manana authored and David Sterba committed Dec 15, 2023
1 parent 3128b54 commit 2ecec0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 7 additions & 0 deletions fs/btrfs/extent_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ static struct rb_node *__tree_search(struct rb_root *root, u64 offset,
return NULL;
}

static inline u64 extent_map_block_end(const struct extent_map *em)
{
if (em->block_start + em->block_len < em->block_start)
return (u64)-1;
return em->block_start + em->block_len;
}

/* Check to see if two extent_map structs are adjacent and safe to merge. */
static int mergable_maps(struct extent_map *prev, struct extent_map *next)
{
Expand Down
7 changes: 0 additions & 7 deletions fs/btrfs/extent_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ static inline u64 extent_map_end(struct extent_map *em)
return em->start + em->len;
}

static inline u64 extent_map_block_end(struct extent_map *em)
{
if (em->block_start + em->block_len < em->block_start)
return (u64)-1;
return em->block_start + em->block_len;
}

void extent_map_tree_init(struct extent_map_tree *tree);
struct extent_map *lookup_extent_mapping(struct extent_map_tree *tree,
u64 start, u64 len);
Expand Down

0 comments on commit 2ecec0d

Please sign in to comment.