From cc27540dd09571938cf8e9c80a311b403ac073c4 Mon Sep 17 00:00:00 2001 From: Filipe Manana Date: Tue, 20 Jan 2026 20:02:51 +0000 Subject: [PATCH] btrfs: remove out label in btrfs_csum_file_blocks() 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 Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/file-item.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c index 568f0e0ebdf63..7bd715442f3ee 100644 --- a/fs/btrfs/file-item.c +++ b/fs/btrfs/file-item.c @@ -1134,7 +1134,7 @@ again: } ret = PTR_ERR(item); if (ret != -EFBIG && ret != -ENOENT) - goto out; + return ret; if (ret == -EFBIG) { u32 item_size; @@ -1150,7 +1150,7 @@ again: /* We didn't find a csum item, insert one. */ ret = find_next_csum_offset(root, path, &next_offset); if (ret < 0) - goto out; + return ret; found_next = 1; goto insert; } @@ -1178,7 +1178,7 @@ again: csum_size, 1); path->search_for_extension = false; if (ret < 0) - goto out; + return ret; if (ret > 0) { if (path->slots[0] == 0) @@ -1234,14 +1234,14 @@ extend_csum: btrfs_header_nritems(path->nodes[0])) { ret = find_next_csum_offset(root, path, &next_offset); if (ret < 0) - goto out; + return ret; found_next = 1; goto insert; } ret = find_next_csum_offset(root, path, &next_offset); if (ret < 0) - goto out; + return ret; tmp = (next_offset - bytenr) >> fs_info->sectorsize_bits; if (tmp <= INT_MAX) @@ -1282,7 +1282,7 @@ insert: ret = btrfs_insert_empty_item(trans, root, path, &file_key, ins_size); if (ret < 0) - goto out; + return ret; leaf = path->nodes[0]; csum: item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_csum_item); @@ -1307,8 +1307,8 @@ found: cond_resched(); goto again; } -out: - return ret; + + return 0; } void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode, -- 2.47.3