Lines Matching defs:path

57  * path: the path we search
68 struct btrfs_path *path, struct btrfs_root_item *root_item,
76 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0);
85 if (path->slots[0] == 0)
87 path->slots[0]--;
91 l = path->nodes[0];
92 slot = path->slots[0];
106 btrfs_release_path(path);
126 struct btrfs_path *path;
133 path = btrfs_alloc_path();
134 if (!path)
137 ret = btrfs_search_slot(trans, root, key, path, 0, 1);
151 l = path->nodes[0];
152 slot = path->slots[0];
162 btrfs_release_path(path);
163 ret = btrfs_search_slot(trans, root, key, path,
170 ret = btrfs_del_item(trans, root, path);
175 btrfs_release_path(path);
176 ret = btrfs_insert_empty_item(trans, root, path,
182 l = path->nodes[0];
183 slot = path->slots[0];
194 btrfs_mark_buffer_dirty(trans, path->nodes[0]);
196 btrfs_free_path(path);
214 struct btrfs_path *path;
220 path = btrfs_alloc_path();
221 if (!path)
231 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0);
237 leaf = path->nodes[0];
238 if (path->slots[0] >= btrfs_header_nritems(leaf)) {
239 ret = btrfs_next_leaf(tree_root, path);
244 leaf = path->nodes[0];
247 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
248 btrfs_release_path(path);
264 btrfs_release_path(path);
307 btrfs_free_path(path);
316 struct btrfs_path *path;
319 path = btrfs_alloc_path();
320 if (!path)
322 ret = btrfs_search_slot(trans, root, key, path, -1, 1);
328 ret = btrfs_del_item(trans, root, path);
330 btrfs_free_path(path);
339 struct btrfs_path *path;
346 path = btrfs_alloc_path();
347 if (!path)
354 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1);
358 leaf = path->nodes[0];
359 ref = btrfs_item_ptr(leaf, path->slots[0],
370 ret = btrfs_del_item(trans, tree_root, path);
379 btrfs_release_path(path);
387 btrfs_free_path(path);
404 * Will return 0, -ENOMEM, or anything from the CoW path
413 struct btrfs_path *path;
418 path = btrfs_alloc_path();
419 if (!path)
426 ret = btrfs_insert_empty_item(trans, tree_root, path, &key,
430 btrfs_free_path(path);
434 leaf = path->nodes[0];
435 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref);
444 btrfs_release_path(path);
451 btrfs_free_path(path);