]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
btrfs: eliminate err variable from merge_reloc_root
authorNikolay Borisov <nborisov@suse.com>
Tue, 24 Nov 2020 15:49:31 +0000 (17:49 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:54:15 +0000 (15:54 +0100)
commitc6a592f2e2093e6a90d651b073746c7950d6420d
tree078ca7dc5afbef160f624a85dd95a63b6009d17b
parentee0d904fd9c5662c58a737c77384f8959fdc8d12
btrfs: eliminate err variable from merge_reloc_root

In most cases when an error is returned from a function 'ret' is simply
assigned to 'err'. There is only one case where walk_up_reloc_tree can
return a positive value - in this case the code breaks from the loop and
ret is going to get its return value from btrfs_cow_block - either 0 or
negative. This retains the old logic of how 'err' used to be set at
this call site.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c