diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-11-21 16:38:36 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-12-15 22:27:02 +0300 |
commit | 2ecec0d6a5b5817edf50fe80196ca774e72dae46 (patch) | |
tree | fa811f0b310c45f2896663f167fe3f391542e90b /fs/btrfs/extent_map.c | |
parent | 3128b548c759da4263b44306093d3a1751dcc58d (diff) | |
download | linux-2ecec0d6a5b5817edf50fe80196ca774e72dae46.tar.xz |
btrfs: unexport extent_map_block_end()
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>
Diffstat (limited to 'fs/btrfs/extent_map.c')
-rw-r--r-- | fs/btrfs/extent_map.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index a6d8368ed0ed..bced39dc0da8 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -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) { |