On 1/22/21 1:21 AM, Naohiro Aota wrote:
From: Johannes Thumshirn <[email protected]>
Since we have no write pointer in conventional zones, we cannot determine
the allocation offset from it. Instead, we set the allocation offset after
the highest addressed extent. This is done by reading the extent tree in
btrfs_load_block_group_zone_info().
However, this function is called from btrfs_read_block_groups(), so the
read lock for the tree node can recursively taken.
To avoid this unsafe locking scenario, release the path before reading the
extent tree to get the allocation offset.
Signed-off-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Josef Bacik <[email protected]>
Thanks,
Josef