mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
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 <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>
This commit is contained in:
parent
bb09b9a491
commit
cc27540dd0
|
|
@ -1134,7 +1134,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
|
|||
}
|
||||
ret = PTR_ERR(item);
|
||||
if (ret != -EFBIG && ret != -ENOENT)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
if (ret == -EFBIG) {
|
||||
u32 item_size;
|
||||
|
|
@ -1150,7 +1150,7 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
|
|||
/* 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 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
|
|||
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 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
|
|||
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 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
|
|||
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 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
|
|||
cond_resched();
|
||||
goto again;
|
||||
}
|
||||
out:
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user