]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
btrfs: remove unnecessary transaction abort in the received subvol ioctl
authorFilipe Manana <fdmanana@suse.com>
Fri, 27 Feb 2026 00:05:08 +0000 (00:05 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Mar 2026 16:20:39 +0000 (17:20 +0100)
If we fail to remove an item from the uuid tree, we don't need to abort
the transaction since we have not done any change before. So remove that
transaction abort.

Reviewed-by: Anand Jain <asj@kernel.org>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c

index 5805ac2078f2cdedc9b6ee6e0d9e65987873ee69..7d86e9c8909ec1c69d3b7c6f6007fea146e9acc8 100644 (file)
@@ -3969,7 +3969,6 @@ static long _btrfs_ioctl_set_received_subvol(struct file *file,
                                          BTRFS_UUID_KEY_RECEIVED_SUBVOL,
                                          btrfs_root_id(root));
                if (unlikely(ret && ret != -ENOENT)) {
-                       btrfs_abort_transaction(trans, ret);
                        btrfs_end_transaction(trans);
                        goto out;
                }