btrfs: sink parameter len to btrfs_split_ordered_extent
authorChristoph Hellwig <hch@lst.de>
Tue, 28 Mar 2023 05:19:52 +0000 (14:19 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:21 +0000 (18:01 +0200)
commit8f4af4b8e1227291bbeaee4b0f2e7f494d9dd2c1
tree9fa8487fbc15db33db6ae814168d9abc6d625626
parent11d33ab6c1f3096194febc6b67c250b3476effa2
btrfs: sink parameter len to btrfs_split_ordered_extent

btrfs_split_ordered_extent is only ever asked to split out the beginning
of an ordered_extent (i.e. post == 0).  Change it to only take a len to
split out, and switch it to allocate the new extent for the beginning,
as that helps with callers that want to keep a pointer to the
ordered_extent that it is stealing from.

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