return node;
}
+
+struct btrfs_backref_edge *btrfs_backref_alloc_edge(
+ struct btrfs_backref_cache *cache)
+{
+ struct btrfs_backref_edge *edge;
+
+ edge = kzalloc(sizeof(*edge), GFP_NOFS);
+ if (edge)
+ cache->nr_edges++;
+ return edge;
+}
struct btrfs_backref_cache *cache, int is_reloc);
struct btrfs_backref_node *btrfs_backref_alloc_node(
struct btrfs_backref_cache *cache, u64 bytenr, int level);
+struct btrfs_backref_edge *btrfs_backref_alloc_edge(
+ struct btrfs_backref_cache *cache);
#endif
}
}
-static struct btrfs_backref_edge *alloc_backref_edge(
- struct btrfs_backref_cache *cache)
-{
- struct btrfs_backref_edge *edge;
-
- edge = kzalloc(sizeof(*edge), GFP_NOFS);
- if (edge)
- cache->nr_edges++;
- return edge;
-}
-
#define LINK_LOWER (1 << 0)
#define LINK_UPPER (1 << 1)
static void link_backref_edge(struct btrfs_backref_edge *edge,
return 0;
}
- edge = alloc_backref_edge(cache);
+ edge = btrfs_backref_alloc_edge(cache);
if (!edge)
return -ENOMEM;
break;
}
- edge = alloc_backref_edge(cache);
+ edge = btrfs_backref_alloc_edge(cache);
if (!edge) {
btrfs_put_root(root);
ret = -ENOMEM;
if (!node->lowest) {
list_for_each_entry(edge, &node->lower, list[UPPER]) {
- new_edge = alloc_backref_edge(cache);
+ new_edge = btrfs_backref_alloc_edge(cache);
if (!new_edge)
goto fail;