summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2020-02-25 12:56:11 +0900
committerDavid Sterba <dsterba@suse.com>2020-03-23 17:01:48 +0100
commit27c314d5ca090e046c7f49892fde7708dbd877a2 (patch)
tree2005db2ffff70477c0172e8571ae8c37d4a42b2d /kernel
parent4f2bafe8a49e5f5e5cf821117ddd6b868c7dc0e7 (diff)
downloadlinux-stable-27c314d5ca090e046c7f49892fde7708dbd877a2.tar.gz
linux-stable-27c314d5ca090e046c7f49892fde7708dbd877a2.tar.bz2
linux-stable-27c314d5ca090e046c7f49892fde7708dbd877a2.zip
btrfs: factor out init_alloc_chunk_ctl
Factor out init_alloc_chunk_ctl() from __btrfs_alloc_chunk(). This function initialises parameters of "struct alloc_chunk_ctl" for allocation. init_alloc_chunk_ctl() handles a common part of the initialisation to load the RAID parameters from btrfs_raid_array. init_alloc_chunk_ctl_policy_regular() decides some parameters for its allocation. The last "else" case in the original code is moved to __btrfs_alloc_chunk() to handle the error case in the common code. Replace the BUG_ON with ASSERT() and error return at the same time. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions