__link_block_group uses GFP_KERNEL

From: Denis Kirjanov
Date: Fri Mar 24 2017 - 05:02:44 EST


Hi guys,

Looks like that current code does GFP_KERNEL allocation inside
__link_block_group.
the function invokes kobject_add and internally creates sysfs files
with the GFP_KERNEL flag set.
But since do_chunk_alloc executes insides the btrfs transaction it's
not allowed to sleep.

Thanks!