Skip to content

Commit

Permalink
btrfs: Use explicit round_down call rather than open-coding it
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nikolay Borisov authored and David Sterba committed Aug 16, 2017
1 parent ebcc930 commit e5600fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e5600fd

Please sign in to comment.