diff options
Diffstat (limited to 'fs/btrfs/extent_map.c')
-rw-r--r-- | fs/btrfs/extent_map.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 46bea0f4dc7b..454ca52d6451 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c | |||
@@ -1,5 +1,4 @@ | |||
1 | #include <linux/err.h> | 1 | #include <linux/err.h> |
2 | #include <linux/gfp.h> | ||
3 | #include <linux/slab.h> | 2 | #include <linux/slab.h> |
4 | #include <linux/module.h> | 3 | #include <linux/module.h> |
5 | #include <linux/spinlock.h> | 4 | #include <linux/spinlock.h> |
@@ -35,7 +34,7 @@ void extent_map_exit(void) | |||
35 | */ | 34 | */ |
36 | void extent_map_tree_init(struct extent_map_tree *tree, gfp_t mask) | 35 | void extent_map_tree_init(struct extent_map_tree *tree, gfp_t mask) |
37 | { | 36 | { |
38 | tree->map.rb_node = NULL; | 37 | tree->map = RB_ROOT; |
39 | rwlock_init(&tree->lock); | 38 | rwlock_init(&tree->lock); |
40 | } | 39 | } |
41 | 40 | ||
@@ -155,20 +154,6 @@ static struct rb_node *__tree_search(struct rb_root *root, u64 offset, | |||
155 | return NULL; | 154 | return NULL; |
156 | } | 155 | } |
157 | 156 | ||
158 | /* | ||
159 | * look for an offset in the tree, and if it can't be found, return | ||
160 | * the first offset we can find smaller than 'offset'. | ||
161 | */ | ||
162 | static inline struct rb_node *tree_search(struct rb_root *root, u64 offset) | ||
163 | { | ||
164 | struct rb_node *prev; | ||
165 | struct rb_node *ret; | ||
166 | ret = __tree_search(root, offset, &prev, NULL); | ||
167 | if (!ret) | ||
168 | return prev; | ||
169 | return ret; | ||
170 | } | ||
171 | |||
172 | /* check to see if two extent_map structs are adjacent and safe to merge */ | 157 | /* check to see if two extent_map structs are adjacent and safe to merge */ |
173 | static int mergable_maps(struct extent_map *prev, struct extent_map *next) | 158 | static int mergable_maps(struct extent_map *prev, struct extent_map *next) |
174 | { | 159 | { |