Lines Matching refs:path
83 struct btrfs_path *path, struct btrfs_root_item *root_item, in btrfs_find_root() argument
91 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root()
100 if (path->slots[0] == 0) in btrfs_find_root()
102 path->slots[0]--; in btrfs_find_root()
106 l = path->nodes[0]; in btrfs_find_root()
107 slot = path->slots[0]; in btrfs_find_root()
121 btrfs_release_path(path); in btrfs_find_root()
140 struct btrfs_path *path; in btrfs_update_root() local
147 path = btrfs_alloc_path(); in btrfs_update_root()
148 if (!path) in btrfs_update_root()
151 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
158 btrfs_print_leaf(root, path->nodes[0]); in btrfs_update_root()
164 l = path->nodes[0]; in btrfs_update_root()
165 slot = path->slots[0]; in btrfs_update_root()
175 btrfs_release_path(path); in btrfs_update_root()
176 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
183 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
188 btrfs_release_path(path); in btrfs_update_root()
189 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
195 l = path->nodes[0]; in btrfs_update_root()
196 slot = path->slots[0]; in btrfs_update_root()
207 btrfs_mark_buffer_dirty(path->nodes[0]); in btrfs_update_root()
209 btrfs_free_path(path); in btrfs_update_root()
226 struct btrfs_path *path; in btrfs_find_orphan_roots() local
237 path = btrfs_alloc_path(); in btrfs_find_orphan_roots()
238 if (!path) in btrfs_find_orphan_roots()
249 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
255 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
256 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
257 ret = btrfs_next_leaf(tree_root, path); in btrfs_find_orphan_roots()
262 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
265 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
266 btrfs_release_path(path); in btrfs_find_orphan_roots()
282 btrfs_release_path(path); in btrfs_find_orphan_roots()
331 btrfs_free_path(path); in btrfs_find_orphan_roots()
339 struct btrfs_path *path; in btrfs_del_root() local
342 path = btrfs_alloc_path(); in btrfs_del_root()
343 if (!path) in btrfs_del_root()
345 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
351 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
353 btrfs_free_path(path); in btrfs_del_root()
363 struct btrfs_path *path; in btrfs_del_root_ref() local
371 path = btrfs_alloc_path(); in btrfs_del_root_ref()
372 if (!path) in btrfs_del_root_ref()
379 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
382 leaf = path->nodes[0]; in btrfs_del_root_ref()
383 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
392 ret = btrfs_del_item(trans, tree_root, path); in btrfs_del_root_ref()
401 btrfs_release_path(path); in btrfs_del_root_ref()
409 btrfs_free_path(path); in btrfs_del_root_ref()
435 struct btrfs_path *path; in btrfs_add_root_ref() local
440 path = btrfs_alloc_path(); in btrfs_add_root_ref()
441 if (!path) in btrfs_add_root_ref()
448 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
452 btrfs_free_path(path); in btrfs_add_root_ref()
456 leaf = path->nodes[0]; in btrfs_add_root_ref()
457 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
466 btrfs_release_path(path); in btrfs_add_root_ref()
473 btrfs_free_path(path); in btrfs_add_root_ref()