btrfs: replace remaining do_div calls with div_u64 variants

Switch to div_u64_rem that does type checking and has more obvious
semantics than do_div.

Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
David Sterba
2015-02-20 18:43:47 +01:00
parent b8b93addde
commit 47c5713f47
4 changed files with 20 additions and 19 deletions

View File

@@ -8670,7 +8670,7 @@ int btrfs_can_relocate(struct btrfs_root *root, u64 bytenr)
min_free <<= 1;
} else if (index == BTRFS_RAID_RAID0) {
dev_min = fs_devices->rw_devices;
do_div(min_free, dev_min);
min_free = div64_u64(min_free, dev_min);
}
/* We need to do this so that we can look at pending chunks */