]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
btrfs: send: simplify return logic from fs_path_add_from_extent_buffer()
authorFilipe Manana <fdmanana@suse.com>
Wed, 5 Feb 2025 12:33:15 +0000 (12:33 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Mar 2025 19:35:45 +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 7a75f1d963f90c834adc34d570637016eff6d3d5..b9de1ab94367f22778c7730e0fcc49f2056fb85f 100644 (file)
@@ -580,12 +580,11 @@ static int fs_path_add_from_extent_buffer(struct fs_path *p,
 
        ret = fs_path_prepare_for_add(p, len, &prepared);
        if (ret < 0)
-               goto out;
+               return ret;
 
        read_extent_buffer(eb, prepared, off, len);
 
-out:
-       return ret;
+       return 0;
 }
 
 static int fs_path_copy(struct fs_path *p, struct fs_path *from)