btrfs: use a single variable to track return value for log_dir_items()
authorFilipe Manana <fdmanana@suse.com>
Tue, 10 Jan 2023 14:56:41 +0000 (14:56 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Feb 2023 16:50:34 +0000 (17:50 +0100)
commit235e1c7b872f9cf16e8a3e6050a05774b8763c58
tree9aef1990b4863eb604dd75d6d25f42daa6ff8897
parent5cce1780dc47906fa06c7be850532c4d1a43822c
btrfs: use a single variable to track return value for log_dir_items()

We currently use 'ret' and 'err' to track the return value for
log_dir_items(), which is confusing and likely the cause for previous
bugs where log_dir_items() did not return an error when it should, fixed
in previous patches.

So change this and use only a single variable, 'ret', to track the return
value. This is simpler and makes it similar to most of the existing code.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-log.c