From: Filipe Manana Date: Thu, 20 Feb 2025 10:58:38 +0000 (+0000) Subject: btrfs: send: simplify return logic from send_unlink() X-Git-Tag: v6.15-rc1~152^2~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26605cc9d0d556618893a5e05abde9b36efe7a3e;p=thirdparty%2Flinux.git btrfs: send: simplify return logic from send_unlink() 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 Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index bda229c7084b3..cbc9ca9db062e 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -856,14 +856,13 @@ static int send_unlink(struct send_ctx *sctx, struct fs_path *path) ret = begin_cmd(sctx, BTRFS_SEND_C_UNLINK); if (ret < 0) - goto out; + return ret; TLV_PUT_PATH(sctx, BTRFS_SEND_A_PATH, path); ret = send_cmd(sctx); tlv_put_failure: -out: return ret; }