]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: send: simplify return logic from record_deleted_ref()
authorFilipe Manana <fdmanana@suse.com>
Tue, 18 Feb 2025 15:50:29 +0000 (15:50 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:46 +0000 (20:35 +0100)
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>
fs/btrfs/send.c

index 181a234e3a5e98c18e5334f803dade4fc08cfa40..6e171b504415cb19d19c61982968a4f4eb466bb4 100644 (file)
@@ -4759,11 +4759,9 @@ static int record_deleted_ref(struct send_ctx *sctx)
                                sctx->cmp_key, 0, record_deleted_ref_if_needed,
                                sctx);
        if (ret < 0)
-               goto out;
-       ret = 0;
+               return ret;
 
-out:
-       return ret;
+       return 0;
 }
 
 static int record_changed_ref(struct send_ctx *sctx)