static void lock_chunks(struct btrfs_root *root)
{
- mutex_lock(&root->fs_info->alloc_mutex);
mutex_lock(&root->fs_info->chunk_mutex);
}
static void unlock_chunks(struct btrfs_root *root)
{
mutex_unlock(&root->fs_info->chunk_mutex);
- mutex_unlock(&root->fs_info->alloc_mutex);
}
int btrfs_cleanup_fs_uuids(void)
* is now congested. Back off and let other work structs
* run instead
*/
- if (pending && bdi_write_congested(bdi)) {
+ if (pending && bdi_write_congested(bdi) &&
+ fs_info->fs_devices->open_devices > 1) {
struct bio *old_head;
spin_lock(&device->io_lock);