]> git.baikalelectronics.ru Git - 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)
commita8d07d581f642315d9dbf888cd84d05e8d9a73d7
tree078ca7dc5afbef160f624a85dd95a63b6009d17b
parentcd24941e4417e4a8e3c0b04ff1de1ce78eff0375
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