diff options
| author | Filipe Manana <fdmanana@suse.com> | 2025-09-24 17:10:27 +0100 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-11-24 21:37:30 +0100 |
| commit | 69e293d28a95ef2652014411038d91867e16e757 (patch) | |
| tree | a7ccee99e68ed37814b47c81b0c4c311be272938 /fs/btrfs/tree-log.c | |
| parent | 828ec765f7968c636c4c163c050ad13da959adef (diff) | |
btrfs: use single return value variable in btrfs_relocate_block_group()
We are using 'ret' and 'err' variables to track return values and errors,
which is pattern that is error prone and we had quite some bugs due to
this pattern in the past.
Simplify this and use a single variable, named 'ret', to track errors and
the return value.
Also rename the variable 'rw' to 'bg_is_ro' which is more meaningful name,
and change its type from int to bool.
Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
0 files changed, 0 insertions, 0 deletions