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>
This commit is contained in:
David Sterba
2015-01-16 17:26:13 +01:00
parent 3284da7b7b
commit b8b93addde
5 changed files with 24 additions and 26 deletions

View File

@@ -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",