btrfs: use single variable to track return value at btrfs_log_inode()
authorFilipe Manana <fdmanana@suse.com>
Thu, 20 Jan 2022 11:00:11 +0000 (11:00 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 Feb 2022 15:19:48 +0000 (16:19 +0100)
commit21c40895407831008c783fe1d0d15fa005fd8626
treeb0efca5e2ce9a4a11ff68ce7a01da0e9cd562868
parentc53cc1edf267337936aaa0c84bd91a0fadef275b
btrfs: use single variable to track return value at btrfs_log_inode()

At btrfs_log_inode(), we have two variables to track errors and the
return value of the function, named 'ret' and 'err'. In some places we
use 'ret' and if gets a non-zero value we assign its value to 'err'
and then jump to the 'out' label, while in other places we use 'err'
directly without 'ret' as an intermediary. This is inconsistent, error
prone and not necessary. So change that to use only the 'ret' variable,
making this consistent with most functions in btrfs.

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/tree-log.c