mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
btrfs: send: simplify return logic from send_link()
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>
This commit is contained in:
parent
264515c7cb
commit
711584496f
|
|
@ -833,7 +833,7 @@ static int send_link(struct send_ctx *sctx,
|
|||
|
||||
ret = begin_cmd(sctx, BTRFS_SEND_C_LINK);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH, path);
|
||||
TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH_LINK, lnk);
|
||||
|
|
@ -841,7 +841,6 @@ static int send_link(struct send_ctx *sctx,
|
|||
ret = send_cmd(sctx);
|
||||
|
||||
tlv_put_failure:
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user