btrfs: remove use of a temporary list at btrfs_lookup_csums_list()
authorFilipe Manana <fdmanana@suse.com>
Thu, 11 Apr 2024 17:33:43 +0000 (18:33 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:03 +0000 (21:31 +0200)
commitc0dce8b6a3b257b8492260f2ea41b7056b795295
tree0b7fb85d367a89c76f6994aeb7b44844346b0f26
parentafcb80624f5bc2fd2f40dc8a7f4fc2198a68e40f
btrfs: remove use of a temporary list at btrfs_lookup_csums_list()

There's no need to use a temporary list to add the checksums, we can just
add them to input list and then on error delete and free any checksums
that were added. So simplify and remove the temporary list.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file-item.c