mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
btrfs: use precomputed end offsets at do_trimming()
The are two computations of end offsets at do_trimming() that are not necessary, as they were previously computed and stored in local const variables. So just use the variables instead, to make the source code shorter and easier to read. Reviewed-by: Anand Jain <anand.jain@oracle.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
9085f42571
commit
b77433b144
1 changed files with 1 additions and 1 deletions
|
@ -3676,7 +3676,7 @@ static int do_trimming(struct btrfs_block_group *block_group,
|
|||
__btrfs_add_free_space(block_group, reserved_start,
|
||||
start - reserved_start,
|
||||
reserved_trim_state);
|
||||
if (start + bytes < reserved_start + reserved_bytes)
|
||||
if (end < reserved_end)
|
||||
__btrfs_add_free_space(block_group, end, reserved_end - end,
|
||||
reserved_trim_state);
|
||||
__btrfs_add_free_space(block_group, start, bytes, trim_state);
|
||||
|
|
Loading…
Reference in a new issue