summaryrefslogtreecommitdiff
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2015-02-20 20:43:47 +0300
committerDavid Sterba <dsterba@suse.cz>2015-03-03 19:24:01 +0300
commit47c5713f4737e460a3b2535abb8ae2e2afe2d2d0 (patch)
tree918e1930e0de0e607736cd7845fc4d3db92d24aa /fs/btrfs/free-space-cache.c
parentb8b93addde1e0192b045da8995e296fc1e40c80f (diff)
downloadlinux-47c5713f4737e460a3b2535abb8ae2e2afe2d2d0.tar.xz
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 {