if (ret == -ENOSPC) {
printk("space info full %Lu\n", flags);
space_info->full = 1;
- goto out;
+ goto out_unlock;
}
BUG_ON(ret);
ret = btrfs_make_block_group(trans, extent_root, 0, flags,
BTRFS_FIRST_CHUNK_TREE_OBJECTID, start, num_bytes);
BUG_ON(ret);
-out:
+out_unlock:
mutex_unlock(&extent_root->fs_info->chunk_mutex);
+out:
return 0;
}
free_extent_buffer(next);
mutex_unlock(&root->fs_info->alloc_mutex);
- reada_walk_down(root, cur, path->slots[*level]);
+ if (path->slots[*level] == 0)
+ reada_walk_down(root, cur, path->slots[*level]);
next = read_tree_block(root, bytenr, blocksize,
ptr_gen);
break;
if (wret < 0)
ret = wret;
- ret = -EAGAIN;
- break;
}
for (i = 0; i <= orig_level; i++) {
if (path->nodes[i]) {