btrfs: remove roots ulist when checking data extent sharedness
authorFilipe Manana <fdmanana@suse.com>
Tue, 11 Oct 2022 12:17:04 +0000 (13:17 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:39 +0000 (18:00 +0100)
commitb629685803bc0cefbbd29240ea28d57d8a17bcbc
treee344bf7703df90a54595612e0f9b6b3efcb8413d
parent84a7949d409753c90dc3477b8cfc18e983b09078
btrfs: remove roots ulist when checking data extent sharedness

Currently btrfs_is_data_extent_shared() is passing a ulist for the roots
argument of find_parent_nodes(), however it does not use that ulist for
anything and for this context that list always ends up with at most one
element.

Since find_parent_nodes() is able to deal with a NULL ulist for its roots
argument, make btrfs_is_data_extent_shared() pass it NULL and avoid the
burden of allocating memory for the unnused roots ulist, initializing it,
releasing it and allocating one struct ulist_node for it during the call
to find_parent_nodes().

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.c
fs/btrfs/backref.h