summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorNikolay Borisov2017-06-27 09:02:25 +0200
committerDavid Sterba2017-08-16 14:19:52 +0200
commite5600fd6fc7d1924ff77681128a364e1dad4435b (patch)
tree750fc2aca1ee6bbcfe9f111e2e6b7d45eb1e36bc /fs/btrfs/volumes.c
parentbtrfs: convert while loop to list_for_each_entry (diff)
downloadkernel-qcow2-linux-e5600fd6fc7d1924ff77681128a364e1dad4435b.tar.gz
kernel-qcow2-linux-e5600fd6fc7d1924ff77681128a364e1dad4435b.tar.xz
kernel-qcow2-linux-e5600fd6fc7d1924ff77681128a364e1dad4435b.zip
btrfs: Use explicit round_down call rather than open-coding it
No functional changes. 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/volumes.c')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index c665af0727e6..b011753ce8bb 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -4762,7 +4762,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
btrfs_cmp_device_info, NULL);
/* round down to number of usable stripes */
- ndevs -= ndevs % devs_increment;
+ ndevs = round_down(ndevs, devs_increment);
if (ndevs < devs_increment * sub_stripes || ndevs < devs_min) {
ret = -ENOSPC;