Commit f9c02e4b authored by Filipe Manana's avatar Filipe Manana Committed by David Sterba
Browse files

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: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 9bdfa3ed
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
		}