Btrfs: fix unprotected list operations at btrfs_write_dirty_block_groups