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>
This commit is contained in:
parent
ebcc9301ea
commit
e5600fd6fc
|
@ -4762,7 +4762,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
|
||||||
btrfs_cmp_device_info, NULL);
|
btrfs_cmp_device_info, NULL);
|
||||||
|
|
||||||
/* round down to number of usable stripes */
|
/* 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) {
|
if (ndevs < devs_increment * sub_stripes || ndevs < devs_min) {
|
||||||
ret = -ENOSPC;
|
ret = -ENOSPC;
|
||||||
|
|
Loading…
Reference in New Issue