summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-02-20 18:43:47 +0100
committerDavid Sterba <dsterba@suse.cz>2015-03-03 17:24:01 +0100
commit47c5713f4737e460a3b2535abb8ae2e2afe2d2d0 (patch)
tree918e1930e0de0e607736cd7845fc4d3db92d24aa /fs/btrfs/free-space-cache.c
parentbtrfs: cleanup 64bit/32bit divs, provably bounded values (diff)
downloadlinux-47c5713f4737e460a3b2535abb8ae2e2afe2d2d0.tar.xz
linux-47c5713f4737e460a3b2535abb8ae2e2afe2d2d0.zip
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>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r--fs/btrfs/free-space-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 13c9b46d4727..764528a4f6fd 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -1673,7 +1673,7 @@ find_free_space(struct btrfs_free_space_ctl *ctl, u64 *offset, u64 *bytes,
*/
if (*bytes >= align) {
tmp = entry->offset - ctl->start + align - 1;
- do_div(tmp, align);
+ tmp = div64_u64(tmp, align);
tmp = tmp * align + ctl->start;
align_off = tmp - entry->offset;
} else {