summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-06-08 15:47:55 +0300
committerDavid Sterba <dsterba@suse.com>2018-10-23 14:48:41 +0200
commit98197fbcc5b5cfb77dd8b2398070ad98b488b958 (patch)
treead92de1a8a8cd4378656cd006b802a6db3d346d2 /extent-tree.c
parent51e1faee06ddfe14989282a8e3a1c8e0c6003268 (diff)
btrfs-progs: add __free_extent2 function
This is a simple adapter to convert the arguments delayed ref arguments to the existing arguments of __free_extent. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r--extent-tree.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/extent-tree.c b/extent-tree.c
index 955d565..94b61cc 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -2136,6 +2136,17 @@ void btrfs_unpin_extent(struct btrfs_fs_info *fs_info,
update_pinned_extents(fs_info, bytenr, num_bytes, 0);
}
+static int __free_extent2(struct btrfs_trans_handle *trans,
+ struct btrfs_delayed_ref_node *node,
+ struct btrfs_delayed_extent_op *extent_op)
+{
+
+ struct btrfs_delayed_tree_ref *ref = btrfs_delayed_node_to_tree_ref(node);
+
+ return __free_extent(trans, node->bytenr, node->num_bytes,
+ ref->parent, ref->root, ref->level, 0, 1);
+}
+
/*
* remove an extent from the root, returns 0 on success
*/