diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-07-18 15:39:08 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-08-16 16:12:03 +0200 |
commit | 47f08b96993831f4c51ed7cb07a86a97d4138d3f (patch) | |
tree | 332e7e0c0fc4ec2d04855521fad8e18dc59bb988 /fs/btrfs/ioctl.c | |
parent | 19aee8dea31fbaa5139968d20e36e1d78cbf30a0 (diff) | |
download | linux-stable-47f08b96993831f4c51ed7cb07a86a97d4138d3f.tar.gz linux-stable-47f08b96993831f4c51ed7cb07a86a97d4138d3f.tar.bz2 linux-stable-47f08b96993831f4c51ed7cb07a86a97d4138d3f.zip |
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 <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); |