From: Nikolay Borisov Date: Tue, 18 Jul 2017 12:39:08 +0000 (+0300) Subject: btrfs: Use explicit round_down macro in btrfs resize ioctl handler X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=47f08b96993831f4c51ed7cb07a86a97d4138d3f;p=openwrt%2Fstaging%2Fblogic.git btrfs: Use explicit round_down macro in btrfs resize ioctl handler No functional changes, just make the code more self-explanatory. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 335e252a99f5..3e744dd17ac5 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1569,8 +1569,7 @@ static noinline int btrfs_ioctl_resize(struct file *file, goto out_free; } - new_size = div_u64(new_size, fs_info->sectorsize); - new_size *= fs_info->sectorsize; + new_size = round_down(new_size, fs_info->sectorsize); btrfs_info_in_rcu(fs_info, "new size for %s is %llu", rcu_str_deref(device->name), new_size);