diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-01-20 23:06:20 +0300 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-02-03 09:56:23 +0300 |
| commit | cefef3cc128076813a7ba5cf34f80130dce3f0a2 (patch) | |
| tree | 0e842f5f2f4007193ca2985f46aa0f615987cbc4 | |
| parent | 61fb7f04ee06e6c7e113a490af1a057f958f1d05 (diff) | |
| download | linux-cefef3cc128076813a7ba5cf34f80130dce3f0a2.tar.xz | |
btrfs: remove out label in btrfs_check_rw_degradable()
There is no point in having the label since all it does is return the
value in the 'ret' variable. Instead make every goto return directly
and remove the label.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
| -rw-r--r-- | fs/btrfs/volumes.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index af0197b242a7..cff2412bc879 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -7576,10 +7576,9 @@ bool btrfs_check_rw_degradable(struct btrfs_fs_info *fs_info, map = btrfs_find_chunk_map(fs_info, 0, U64_MAX); /* No chunk at all? Return false anyway */ - if (!map) { - ret = false; - goto out; - } + if (!map) + return false; + while (map) { int missing = 0; int max_tolerated; @@ -7604,15 +7603,14 @@ bool btrfs_check_rw_degradable(struct btrfs_fs_info *fs_info, "chunk %llu missing %d devices, max tolerance is %d for writable mount", map->start, missing, max_tolerated); btrfs_free_chunk_map(map); - ret = false; - goto out; + return false; } next_start = map->start + map->chunk_len; btrfs_free_chunk_map(map); map = btrfs_find_chunk_map(fs_info, next_start, U64_MAX - next_start); } -out: + return ret; } |
