diff options
Diffstat (limited to 'fs/btrfs/extent_map.c')
-rw-r--r-- | fs/btrfs/extent_map.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 4a4362f5cc52..be94030e1dfb 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -529,35 +529,6 @@ static struct extent_map *next_extent_map(const struct extent_map *em) return container_of(next, struct extent_map, rb_node); } -/* - * Get the extent map that immediately follows another one. - * - * @tree: The extent map tree that the extent map belong to. - * Holding read or write access on the tree's lock is required. - * @em: An extent map from the given tree. The caller must ensure that - * between getting @em and between calling this function, the - * extent map @em is not removed from the tree - for example, by - * holding the tree's lock for the duration of those 2 operations. - * - * Returns the extent map that immediately follows @em, or NULL if @em is the - * last extent map in the tree. - */ -struct extent_map *btrfs_next_extent_map(const struct extent_map_tree *tree, - const struct extent_map *em) -{ - struct extent_map *next; - - /* The lock must be acquired either in read mode or write mode. */ - lockdep_assert_held(&tree->lock); - ASSERT(extent_map_in_tree(em)); - - next = next_extent_map(em); - if (next) - refcount_inc(&next->refs); - - return next; -} - static struct extent_map *prev_extent_map(struct extent_map *em) { struct rb_node *prev; |