diff options
author | Filipe Manana <fdmanana@suse.com> | 2025-02-18 15:36:01 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-03-18 20:35:45 +0100 |
commit | 9435159f28c4911ca33a69d8fe197baf368261df (patch) | |
tree | 6aa988ce796d2f8f60d3ca5da68abddbaf70dff0 | |
parent | ec666c84deba56f714505b53556a97565f72db86 (diff) |
btrfs: send: simplify return logic from send_remove_xattr()
There's no need for the 'out' label as there are no resources to cleanup
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>
-rw-r--r-- | fs/btrfs/send.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 653e0b9a94caa..5fd3deaf14d60 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -4886,11 +4886,11 @@ static int send_remove_xattr(struct send_ctx *sctx, struct fs_path *path, const char *name, int name_len) { - int ret = 0; + int ret; ret = begin_cmd(sctx, BTRFS_SEND_C_REMOVE_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); @@ -4898,7 +4898,6 @@ static int send_remove_xattr(struct send_ctx *sctx, ret = send_cmd(sctx); tlv_put_failure: -out: return ret; } |