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

Commit 9ba4611a authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: Fix 32 bit compiles by using an unsigned long byte count in the ordered extent



The ordered extents have to fit in memory, so an unsigned long is sufficient.

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent ed98b56a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -95,7 +95,8 @@ struct btrfs_ordered_extent {
 * calculates the total size you need to allocate for an ordered sum
 * structure spanning 'bytes' in the file
 */
static inline int btrfs_ordered_sum_size(struct btrfs_root *root, u64 bytes)
static inline int btrfs_ordered_sum_size(struct btrfs_root *root,
					 unsigned long bytes)
{
	unsigned long num_sectors = (bytes + root->sectorsize - 1) /
		root->sectorsize;