From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 7/8] btrfs-progs: Remove __free_extent2
Date: Thu, 16 Aug 2018 16:10:34 +0300 [thread overview]
Message-ID: <1534425035-323-8-git-send-email-nborisov@suse.com> (raw)
In-Reply-To: <1534425035-323-1-git-send-email-nborisov@suse.com>
Now that delayed refs have been all wired up clean up the __free_extent2
adapter function since it's no longer needed. No functional changes.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
extent-tree.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/extent-tree.c b/extent-tree.c
index 6893b4c07019..1a63efdd9681 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -2052,17 +2052,6 @@ 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
*/
@@ -4183,7 +4172,9 @@ static int run_delayed_tree_ref(struct btrfs_trans_handle *trans,
BUG_ON(!extent_op || !extent_op->update_flags);
ret = alloc_reserved_tree_block2(trans, node, extent_op);
} else if (node->action == BTRFS_DROP_DELAYED_REF) {
- ret = __free_extent2(trans, node, extent_op);
+ struct btrfs_delayed_tree_ref *ref = btrfs_delayed_node_to_tree_ref(node);
+ ret = __free_extent(trans, node->bytenr, node->num_bytes,
+ ref->parent, ref->root, ref->level, 0, 1);
} else {
BUG();
}
--
2.7.4
next prev parent reply other threads:[~2018-08-16 16:09 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 13:10 [PATCH 0/8 V2] Add delayed-refs support to btrfs-progs Nikolay Borisov
2018-08-16 13:10 ` [PATCH 1/8] btrfs-progs: Add __free_extent2 function Nikolay Borisov
2018-08-16 13:10 ` [PATCH 2/8] btrfs-progs: Add alloc_reserved_tree_block2 function Nikolay Borisov
2018-08-16 13:10 ` [PATCH 3/8] btrfs-progs: Add delayed refs infrastructure Nikolay Borisov
2018-08-16 13:10 ` [PATCH 4/8] btrfs-progs: Make btrfs_write_dirty_block_groups take only trans argument Nikolay Borisov
2018-08-16 13:10 ` [PATCH 5/8] btrfs-progs: Wire up delayed refs Nikolay Borisov
2018-09-05 2:10 ` Qu Wenruo
2018-09-05 5:42 ` Nikolay Borisov
2018-09-05 5:53 ` Qu Wenruo
2018-09-05 7:41 ` Nikolay Borisov
2018-09-05 7:46 ` Qu Wenruo
2018-09-05 7:50 ` Nikolay Borisov
2018-08-16 13:10 ` [PATCH 6/8] btrfs-progs: Remove old delayed refs infrastructure Nikolay Borisov
2018-08-16 13:10 ` Nikolay Borisov [this message]
2018-08-16 13:10 ` [PATCH 8/8] btrfs-progs: Merge alloc_reserved_tree_block(2|) Nikolay Borisov
2018-09-14 15:28 ` [PATCH 0/8 V2] Add delayed-refs support to btrfs-progs David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1534425035-323-8-git-send-email-nborisov@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).