btrfs: re-arrange statements in setup_items_for_insert
Rearrange statements calculating the offset of the newly added items so that the calculation has to be done only once. No functional change. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
7573df5547
commit
fc0716c2f6
@ -4832,8 +4832,8 @@ void setup_items_for_insert(struct btrfs_root *root, struct btrfs_path *path,
|
||||
btrfs_cpu_key_to_disk(&disk_key, cpu_key + i);
|
||||
btrfs_set_item_key(leaf, &disk_key, slot + i);
|
||||
item = btrfs_item_nr(slot + i);
|
||||
btrfs_set_token_item_offset(&token, item, data_end - data_size[i]);
|
||||
data_end -= data_size[i];
|
||||
btrfs_set_token_item_offset(&token, item, data_end);
|
||||
btrfs_set_token_item_size(&token, item, data_size[i]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user