Commit 9ba4611a3a7902c6bad70c5c205de5161fcfc17b

Authored by Chris Mason
1 parent ed98b56a63

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: Chris Mason <chris.mason@oracle.com>

Showing 1 changed file with 2 additions and 1 deletions Side-by-side Diff

fs/btrfs/ordered-data.h
... ... @@ -95,7 +95,8 @@
95 95 * calculates the total size you need to allocate for an ordered sum
96 96 * structure spanning 'bytes' in the file
97 97 */
98   -static inline int btrfs_ordered_sum_size(struct btrfs_root *root, u64 bytes)
  98 +static inline int btrfs_ordered_sum_size(struct btrfs_root *root,
  99 + unsigned long bytes)
99 100 {
100 101 unsigned long num_sectors = (bytes + root->sectorsize - 1) /
101 102 root->sectorsize;