return 0;
}
+int btrfs_inc_root_ref(struct btrfs_trans_handle *trans,
+ struct btrfs_root *root)
+{
+ return inc_block_ref(trans, root, root->node->b_blocknr, 1);
+}
+
int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
struct buffer_head *buf)
{
path = btrfs_alloc_path();
BUG_ON(!path);
btrfs_init_path(path);
+
ret = btrfs_search_slot(trans, extent_root, &key, path, -1, 1);
if (ret) {
printk("failed to find %Lu\n", key.objectid);
if (root->fs_info->last_insert.objectid > search_start)
search_start = root->fs_info->last_insert.objectid;
- path = btrfs_alloc_path();
-
check_failed:
btrfs_init_path(path);
ins->objectid = search_start;