]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: update prelim_ref_insert() to use rb helpers
authorRoger L. Beckermeyer III <beckerlee3@gmail.com>
Tue, 17 Dec 2024 21:58:52 +0000 (08:28 +1030)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:18 +0000 (14:53 +0100)
commit14ae60c71221d3ec64482476262e5b9eb4494be4
treed2b63d0c6a2cffa02f8a09bb3ec6628da64c9186
parent372484f2c27c5ebd2b37d6c7d3f92678fc8c07af
btrfs: update prelim_ref_insert() to use rb helpers

Update prelim_ref_insert() to use rb_find_add_cached().

There is a special change that the existing prelim_ref_compare() is
called with the first parameter as the existing ref in the rbtree.

But the newer rb_find_add_cached() expects the cmp() function to have
the first parameter as the to-be-added node, thus the new helper
prelim_ref_rb_add_cmp() need to adapt this new order.

Signed-off-by: Roger L. Beckermeyer III <beckerlee3@gmail.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.c