btrfs: Refactor btrfs_calc_avail_data_space
authorNikolay Borisov <nborisov@suse.com>
Wed, 3 Jul 2019 12:32:59 +0000 (15:32 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:02 +0000 (14:59 +0200)
commit559ca6ea695e3dedc7b6a11ce31fcc6eac398797
tree424a470f18d140fd7666a6d42f4f42e4131a4307
parente678934cbe5f026c2765a1da651e61daa5724fb3
btrfs: Refactor btrfs_calc_avail_data_space

Simplify the code by removing variables that don't bring any real value
as well as simplifying the checks when buidling the candidate list of
devices. 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>
fs/btrfs/super.c