From 25aff7b964521eb4ab627dc092335e4690c07e95 Mon Sep 17 00:00:00 2001 From: Filipe Manana Date: Tue, 18 Feb 2025 15:40:17 +0000 Subject: [PATCH] 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 --- fs/btrfs/send.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; } -- 2.47.2