Skip to content

Commit f9c02e4

Browse files
fdmananakdave
authored andcommitted
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>
1 parent 9bdfa3e commit f9c02e4

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

fs/btrfs/tree-log.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,6 @@ static int overwrite_item(struct walk_control *wc, struct btrfs_path *path)
471471
}
472472
src_copy = kmalloc(item_size, GFP_NOFS);
473473
if (!src_copy) {
474-
btrfs_release_path(path);
475474
btrfs_abort_transaction(trans, -ENOMEM);
476475
return -ENOMEM;
477476
}

0 commit comments

Comments
 (0)