From: Filipe Manana Date: Tue, 18 Feb 2025 15:49:11 +0000 (+0000) Subject: btrfs: send: simplify return logic from record_new_ref() X-Git-Tag: v6.15-rc1~152^2~97 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=de6d3a5b78757a462ebcebdcbb52ffce7dd61c70;p=thirdparty%2Flinux.git btrfs: send: simplify return logic from record_new_ref() 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 b715557ec7209..181a234e3a5e9 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -4746,11 +4746,9 @@ static int record_new_ref(struct send_ctx *sctx) ret = iterate_inode_ref(sctx->send_root, sctx->left_path, sctx->cmp_key, 0, record_new_ref_if_needed, sctx); if (ret < 0) - goto out; - ret = 0; + return ret; -out: - return ret; + return 0; } static int record_deleted_ref(struct send_ctx *sctx)