summaryrefslogtreecommitdiff
path: root/fs/btrfs/relocation.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2020-03-03 08:22:57 +0300
committerDavid Sterba <dsterba@suse.com>2020-05-25 12:25:19 +0300
commit47254d07f37590fddc1516006e3e79453e755424 (patch)
tree234cfbdb5030c1c7cb58e7a14cd814755b317c20 /fs/btrfs/relocation.c
parentb1818dab9bda1da8f3ea5a13230b5d91ae964f00 (diff)
downloadlinux-47254d07f37590fddc1516006e3e79453e755424.tar.xz
btrfs: backref: rename and move alloc_backref_edge()
Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r--fs/btrfs/relocation.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index da0b7f7dc062..8b22b5966039 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -218,17 +218,6 @@ static void free_backref_node(struct btrfs_backref_cache *cache,
}
}
-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,
@@ -581,7 +570,7 @@ static int handle_direct_tree_backref(struct btrfs_backref_cache *cache,
return 0;
}
- edge = alloc_backref_edge(cache);
+ edge = btrfs_backref_alloc_edge(cache);
if (!edge)
return -ENOMEM;
@@ -698,7 +687,7 @@ static int handle_indirect_tree_backref(struct btrfs_backref_cache *cache,
break;
}
- edge = alloc_backref_edge(cache);
+ edge = btrfs_backref_alloc_edge(cache);
if (!edge) {
btrfs_put_root(root);
ret = -ENOMEM;
@@ -1263,7 +1252,7 @@ static int clone_backref_node(struct btrfs_trans_handle *trans,
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;