Lines Matching refs:path
54 * path: the path we search
65 struct btrfs_path *path, struct btrfs_root_item *root_item,
73 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0);
82 if (path->slots[0] == 0)
84 path->slots[0]--;
88 l = path->nodes[0];
89 slot = path->slots[0];
103 btrfs_release_path(path);
123 struct btrfs_path *path;
130 path = btrfs_alloc_path();
131 if (!path)
134 ret = btrfs_search_slot(trans, root, key, path, 0, 1);
148 l = path->nodes[0];
149 slot = path->slots[0];
159 btrfs_release_path(path);
160 ret = btrfs_search_slot(trans, root, key, path,
167 ret = btrfs_del_item(trans, root, path);
172 btrfs_release_path(path);
173 ret = btrfs_insert_empty_item(trans, root, path,
179 l = path->nodes[0];
180 slot = path->slots[0];
191 btrfs_mark_buffer_dirty(path->nodes[0]);
193 btrfs_free_path(path);
211 struct btrfs_path *path;
217 path = btrfs_alloc_path();
218 if (!path)
228 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0);
234 leaf = path->nodes[0];
235 if (path->slots[0] >= btrfs_header_nritems(leaf)) {
236 ret = btrfs_next_leaf(tree_root, path);
241 leaf = path->nodes[0];
244 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
245 btrfs_release_path(path);
261 btrfs_release_path(path);
289 btrfs_free_path(path);
298 struct btrfs_path *path;
301 path = btrfs_alloc_path();
302 if (!path)
304 ret = btrfs_search_slot(trans, root, key, path, -1, 1);
310 ret = btrfs_del_item(trans, root, path);
312 btrfs_free_path(path);
322 struct btrfs_path *path;
330 path = btrfs_alloc_path();
331 if (!path)
338 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1);
343 leaf = path->nodes[0];
344 ref = btrfs_item_ptr(leaf, path->slots[0],
355 ret = btrfs_del_item(trans, tree_root, path);
364 btrfs_release_path(path);
372 btrfs_free_path(path);
389 * Will return 0, -ENOMEM, or anything from the CoW path
398 struct btrfs_path *path;
403 path = btrfs_alloc_path();
404 if (!path)
411 ret = btrfs_insert_empty_item(trans, tree_root, path, &key,
415 btrfs_free_path(path);
419 leaf = path->nodes[0];
420 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref);
429 btrfs_release_path(path);
436 btrfs_free_path(path);