diff mbox series

[26/26] btrfs: send: simplify return logic from send_set_xattr()

Message ID 4638c8874946aca59742d03715284a3358656b77.1739965104.git.fdmanana@suse.com (mailing list archive)
State New
Headers show
Series btrfs: avoid repeated path computations and allocations for send | expand

Commit Message

Filipe Manana Feb. 19, 2025, 11:43 a.m. UTC
From: Filipe Manana <fdmanana@suse.com>

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>
---
 fs/btrfs/send.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 77cedde3b57b..644172f1cdb0 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -4921,7 +4921,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);
@@ -4930,7 +4930,6 @@  static int send_set_xattr(struct send_ctx *sctx,
 	ret = send_cmd(sctx);
 
 tlv_put_failure:
-out:
 	return ret;
 }