summaryrefslogtreecommitdiff
path: root/fs/btrfs/zoned.c
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2021-02-04 13:21:44 +0300
committerDavid Sterba <dsterba@suse.com>2021-02-09 04:32:20 +0300
commit4afd2fe835a0ff87fb88cba7a7daa881d8e14233 (patch)
tree70b3a60c496d009afbaf29d7da0d73ea9b6b02b5 /fs/btrfs/zoned.c
parentd6639b35da2d742f9cbcdf8f49f87f2bde9fd479 (diff)
downloadlinux-4afd2fe835a0ff87fb88cba7a7daa881d8e14233.tar.xz
btrfs: release path before calling to btrfs_load_block_group_zone_info
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 could be recursively taken. To avoid this unsafe locking scenario, release the path before reading the extent tree to get the allocation offset. Reviewed-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/zoned.c')
0 files changed, 0 insertions, 0 deletions