add_root_to_dirty_list(root);
path->nodes[level] = NULL;
clean_tree_block(trans, root, mid);
- wait_on_tree_block_writeback(root, mid);
/* once for the path */
free_extent_buffer(mid);
ret = btrfs_free_extent(trans, root, mid->start, mid->len,
u32 blocksize = right->len;
clean_tree_block(trans, root, right);
- wait_on_tree_block_writeback(root, right);
free_extent_buffer(right);
right = NULL;
wret = del_ptr(trans, root, path, level + 1, pslot +
u64 bytenr = mid->start;
u32 blocksize = mid->len;
clean_tree_block(trans, root, mid);
- wait_on_tree_block_writeback(root, mid);
free_extent_buffer(mid);
mid = NULL;
wret = del_ptr(trans, root, path, level + 1, pslot);
} else {
u64 root_gen = btrfs_header_generation(path->nodes[1]);
clean_tree_block(trans, root, leaf);
- wait_on_tree_block_writeback(root, leaf);
wret = del_ptr(trans, root, path, 1, path->slots[1]);
if (wret)
ret = wret;
path->nodes[1]);
clean_tree_block(trans, root, leaf);
- wait_on_tree_block_writeback(root, leaf);
wret = del_ptr(trans, root, path, 1, slot);
if (wret)
struct btrfs_csum_item *item;
struct btrfs_path *path = NULL;
u32 csum;
+
if (btrfs_test_opt(root, NODATASUM) ||
btrfs_test_flag(inode, NODATASUM))
return 0;
+
mutex_lock(&root->fs_info->fs_mutex);
path = btrfs_alloc_path();
item = btrfs_lookup_csum(NULL, root, path, inode->i_ino, start, 0);