From: Filipe Manana Date: Tue, 18 Feb 2025 15:40:17 +0000 (+0000) Subject: btrfs: send: simplify return logic from send_set_xattr() X-Git-Tag: v6.15-rc1~152^2~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25aff7b964521eb4ab627dc092335e4690c07e95;p=thirdparty%2Flinux.git btrfs: send: simplify return logic from send_set_xattr() 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 2c1259068b761..878b32331bc2e 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -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; }