From: Filipe Manana Date: Tue, 2 Sep 2025 16:08:19 +0000 (+0100) Subject: btrfs: remove redundant path release when overwriting item during log replay X-Git-Tag: v6.18-rc1~204^2~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f9c02e4b525d766bebfcbeac1b25b03aacfe62f1;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 65b8858e82d1d..66500ebdd35c7 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -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; }