diff options
author | David Sterba <dsterba@suse.cz> | 2015-01-16 17:26:13 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-03-03 17:24:00 +0100 |
commit | b8b93addde1e0192b045da8995e296fc1e40c80f (patch) | |
tree | d78234932a05c824c0feac2ada9bd0a3fce42f72 /fs/btrfs/ioctl.c | |
parent | 3284da7b7b585e6e8e98f374a51d234d14c7a0a2 (diff) | |
download | linux-b8b93addde1e0192b045da8995e296fc1e40c80f.tar.bz2 |
btrfs: cleanup 64bit/32bit divs, provably bounded values
The divisor is derived from nodesize or PAGE_SIZE, fits into 32bit type.
Get rid of a few more do_div instances.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 0a9fe214deeb..4a5524c2713a 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1564,7 +1564,7 @@ static noinline int btrfs_ioctl_resize(struct file *file, goto out_free; } - do_div(new_size, root->sectorsize); + new_size = div_u64(new_size, root->sectorsize); new_size *= root->sectorsize; printk_in_rcu(KERN_INFO "BTRFS: new size for %s is %llu\n", |