btrfs: unify overwrite_item() and do_overwrite_item()
authorFilipe Manana <fdmanana@suse.com>
Mon, 21 Nov 2022 10:23:23 +0000 (10:23 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:59 +0000 (18:00 +0100)
commit3a8d1db341b93e65fa76051ab833b3640842b6eb
tree1274a71566548f662343cedeff661bbf4134251c
parent63d5429f68a3d4c4aa27e65a05196c17f86c41d6
btrfs: unify overwrite_item() and do_overwrite_item()

After commit 193df6245704 ("btrfs: search for last logged dir index if
it's not cached in the inode"), there are no more callers of
do_overwrite_item(), except overwrite_item().

Originally both used to be the same function, but were split in
commit 086dcbfa50d3 ("btrfs: insert items in batches when logging a
directory when possible"), as there was the need to execute all logic
of overwrite_item() but skip the tree search, since in the context of
directory logging we already had a path with a leaf to copy data from.

So unify them again as there is no more need to have them split.

Reviewed-by: Josef Bacik <josef@toxicpanda.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/tree-log.c