diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-02-18 15:40:17 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-03-18 20:35:46 +0100 |
| commit | 25aff7b964521eb4ab627dc092335e4690c07e95 (patch) | |
| tree | 8ffd816232da2563a9a5e67d3d72eac2aaf20188 | |
| parent | 374d45af6435534a11b01b88762323abf03dd755 (diff) | |
| download | linux-25aff7b964521eb4ab627dc092335e4690c07e95.tar.gz linux-25aff7b964521eb4ab627dc092335e4690c07e95.zip | |
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 <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 | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 2c1259068b76..878b32331bc2 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; } |
