Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bf3b490 authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: Avoid 64 bit div for RAID10

parent 3b951516
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -724,7 +724,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
	if (type & (BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP))
		*num_bytes = calc_size;
	else if (type & BTRFS_BLOCK_GROUP_RAID10)
		*num_bytes = calc_size * num_stripes / sub_stripes;
		*num_bytes = calc_size * (num_stripes / sub_stripes);
	else
		*num_bytes = calc_size * num_stripes;