]> 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)
commit78739bf9c5dcb97f0d045a097a9d0d5a11b88f57
tree6289351568d28d8c248eba096e9ef61095ef2c5c
parent3c952be598679c0a27b93c0bc98c6574cc38eb2b
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