btrfs: merge the two calls to btrfs_add_ordered_extent in run_delalloc_nocow
authorChristoph Hellwig <hch@lst.de>
Wed, 31 May 2023 07:53:56 +0000 (09:53 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:36 +0000 (13:59 +0200)
commit3daea5fda1cdd74829d0306ab88b4798c38254ea
treefafe14311a15baf081f54fee9b182e23e29eb886
parenta39da514eba81e687db05efb1e8b7cb393e2cb71
btrfs: merge the two calls to btrfs_add_ordered_extent in run_delalloc_nocow

Refactor run_delalloc_nocow a little bit so that there is only a single
call to btrfs_add_ordered_extent instead of two.

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