]> git.baikalelectronics.ru Git - kernel.git/commit
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, 14 Mar 2022 12:13:48 +0000 (13:13 +0100)
commit559bf3eb995749695e0bbf2bf8432437e5690c2f
tree6289351568d28d8c248eba096e9ef61095ef2c5c
parentf5bda70ca5828b5ebba3cec5f82f8595d0f92d44
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