diff options
author | 2025-02-20 10:57:05 +0000 | |
---|---|---|
committer | 2025-03-18 20:35:46 +0100 | |
commit | 264515c7cb62661d07f82e4fbb4c5a40ae88a0a3 (patch) | |
tree | 03c6b29d2a93e7ba2c89e83c7aa6f6a25be1da70 | |
parent | btrfs: send: simplify return logic from send_verity() (diff) | |
download | wireguard-linux-264515c7cb62661d07f82e4fbb4c5a40ae88a0a3.tar.xz wireguard-linux-264515c7cb62661d07f82e4fbb4c5a40ae88a0a3.zip |
btrfs: send: simplify return logic from send_rename()
There is no need to have an 'out' label and jump into it since there are
no resource cleanups to perform (release locks, free memory, etc), so
make this simpler by removing the label and goto and instead return
directly.
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 f161e6a695bd..d5c151651d07 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -809,7 +809,7 @@ static int send_rename(struct send_ctx *sctx, ret = begin_cmd(sctx, BTRFS_SEND_C_RENAME); if (ret < 0) - goto out; + return ret; TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH, from); TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH_TO, to); @@ -817,7 +817,6 @@ static int send_rename(struct send_ctx *sctx, ret = send_cmd(sctx); tlv_put_failure: -out: return ret; } |