btrfs: send: simplify return logic from send_set_xattr()
authorFilipe Manana <fdmanana@suse.com>
Tue, 18 Feb 2025 15:40:17 +0000 (15:40 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:46 +0000 (20:35 +0100)
There's no longer any need for the 'out' label as there are no resources
to cleanup anymore in case of an error and we can directly return if
begin_cmd() fails.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/send.c

index 2c1259068b761b8a339356200e61a97ea3cba16f..878b32331bc2e7f76b2420fc17987fb7660d4c8d 100644 (file)
@@ -4917,7 +4917,7 @@ static int send_set_xattr(struct send_ctx *sctx,
 
        ret = begin_cmd(sctx, BTRFS_SEND_C_SET_XATTR);
        if (ret < 0)
-               goto out;
+               return ret;
 
        TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH, path);
        TLV_PUT_STRING(sctx, BTRFS_SEND_A_XATTR_NAME, name, name_len);
@@ -4926,7 +4926,6 @@ static int send_set_xattr(struct send_ctx *sctx,
        ret = send_cmd(sctx);
 
 tlv_put_failure:
-out:
        return ret;
 }