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 Feb 2022 15:36:00 +0000 (16:36 +0100)
commita44dd4801754a386cbd2fc8b28684e0c135de906
treeff0a8a024327313b2f60d1195f5b4c020ecdc5dd
parent68d4f72a066ec356f6a75dafeaeb8dfd30d9ae4d
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