btrfs: add a helper to get the delayed ref node from the data/tree ref
authorJosef Bacik <josef@toxicpanda.com>
Fri, 12 Apr 2024 20:42:28 +0000 (16:42 -0400)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:04 +0000 (21:31 +0200)
commit0eea355fc0f48916f29d1f066d06df49f075a593
treee6b9f2ce12c3c49ebc7a14e1747e70062ec78a98
parent26c0fae3e72ff1cf269891aae75c762dc04ee1dd
btrfs: add a helper to get the delayed ref node from the data/tree ref

We have several different ways we refer to references throughout the
code and it's not consistent and there's a bit of duplication.  In order
to clean this up I want to have one structure we use to define reference
information, and one structure we use for the delayed reference
information.  Start this process by adding a helper to get from the
btrfs_delayed_data_ref/btrfs_delayed_tree_ref to the
btrfs_delayed_ref_node so that it'll make moving these structures around
simpler.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-ref.c
fs/btrfs/delayed-ref.h