btrfs: remove redundant path release when overwriting item during log replay

At overwrite_item() we have a redundant btrfs_release_path() just before
failing with -ENOMEM, as the caller who passed in the path will free it
and therefore also release any refcounts and locks on the extent buffers
of the path. So remove it.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Filipe Manana 2025-09-02 17:08:19 +01:00 committed by David Sterba
parent 9bdfa3eddb
commit f9c02e4b52

View File

@ -471,7 +471,6 @@ static int overwrite_item(struct walk_control *wc, struct btrfs_path *path)
}
src_copy = kmalloc(item_size, GFP_NOFS);
if (!src_copy) {
btrfs_release_path(path);
btrfs_abort_transaction(trans, -ENOMEM);
return -ENOMEM;
}