Signed-off-by: Nikolay Borisov <nborisov@xxxxxxxx>
---
Dave, please fold this into c1ac11142016 ("btrfs: factor out decide_stripe_size()")
fs/btrfs/volumes.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 267847c72c22..111c1270f800 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -4994,11 +4994,7 @@ static int decide_stripe_size(struct btrfs_fs_devices *fs_devices,
{
struct btrfs_fs_info *info = fs_devices->fs_info;
- /*
- * Round down to number of usable stripes, devs_increment can be any
- * number so we can't use round_down()
- */
- ctl->ndevs -= ctl->ndevs % ctl->devs_increment;
+ ctl->ndevs = rounddown(ctl->ndevs, ctl->devs_increment);
if (ctl->ndevs < ctl->devs_min) {
if (btrfs_test_opt(info, ENOSPC_DEBUG)) {
--
2.17.1