btrfs: pass an ordered_extent to btrfs_reloc_clone_csums
authorChristoph Hellwig <hch@lst.de>
Wed, 31 May 2023 07:53:57 +0000 (09:53 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:36 +0000 (13:59 +0200)
commit34bfaf15304b10e9c9e2fbd3012fa72710929b32
treee7f0f1abb1a343eb939eab026c7e2d50a8e4b985
parent3daea5fda1cdd74829d0306ab88b4798c38254ea
btrfs: pass an ordered_extent to btrfs_reloc_clone_csums

Both callers of btrfs_reloc_clone_csums allocate the ordered_extent that
btrfs_reloc_clone_csums operates on.  Switch them to use
btrfs_alloc_ordered_extent instead of btrfs_add_ordered_extent and
pass the ordered_extent to btrfs_reloc_clone_csums instead of doing an
extra lookup.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c
fs/btrfs/relocation.c
fs/btrfs/relocation.h