Lines Matching refs:path

82 		    struct btrfs_path *path, struct btrfs_root_item *root_item,  in btrfs_find_root()  argument
90 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root()
99 if (path->slots[0] == 0) in btrfs_find_root()
101 path->slots[0]--; in btrfs_find_root()
105 l = path->nodes[0]; in btrfs_find_root()
106 slot = path->slots[0]; in btrfs_find_root()
120 btrfs_release_path(path); in btrfs_find_root()
139 struct btrfs_path *path; in btrfs_update_root() local
146 path = btrfs_alloc_path(); in btrfs_update_root()
147 if (!path) in btrfs_update_root()
150 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
157 btrfs_print_leaf(root, path->nodes[0]); in btrfs_update_root()
163 l = path->nodes[0]; in btrfs_update_root()
164 slot = path->slots[0]; in btrfs_update_root()
174 btrfs_release_path(path); in btrfs_update_root()
175 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
182 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
187 btrfs_release_path(path); in btrfs_update_root()
188 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
194 l = path->nodes[0]; in btrfs_update_root()
195 slot = path->slots[0]; in btrfs_update_root()
206 btrfs_mark_buffer_dirty(path->nodes[0]); in btrfs_update_root()
208 btrfs_free_path(path); in btrfs_update_root()
225 struct btrfs_path *path; in btrfs_find_orphan_roots() local
236 path = btrfs_alloc_path(); in btrfs_find_orphan_roots()
237 if (!path) in btrfs_find_orphan_roots()
248 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
254 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
255 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
256 ret = btrfs_next_leaf(tree_root, path); in btrfs_find_orphan_roots()
261 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
264 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
265 btrfs_release_path(path); in btrfs_find_orphan_roots()
281 btrfs_release_path(path); in btrfs_find_orphan_roots()
322 btrfs_free_path(path); in btrfs_find_orphan_roots()
330 struct btrfs_path *path; in btrfs_del_root() local
333 path = btrfs_alloc_path(); in btrfs_del_root()
334 if (!path) in btrfs_del_root()
336 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
342 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
344 btrfs_free_path(path); in btrfs_del_root()
354 struct btrfs_path *path; in btrfs_del_root_ref() local
362 path = btrfs_alloc_path(); in btrfs_del_root_ref()
363 if (!path) in btrfs_del_root_ref()
370 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
373 leaf = path->nodes[0]; in btrfs_del_root_ref()
374 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
383 ret = btrfs_del_item(trans, tree_root, path); in btrfs_del_root_ref()
392 btrfs_release_path(path); in btrfs_del_root_ref()
400 btrfs_free_path(path); in btrfs_del_root_ref()
426 struct btrfs_path *path; in btrfs_add_root_ref() local
431 path = btrfs_alloc_path(); in btrfs_add_root_ref()
432 if (!path) in btrfs_add_root_ref()
439 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
443 btrfs_free_path(path); in btrfs_add_root_ref()
447 leaf = path->nodes[0]; in btrfs_add_root_ref()
448 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
457 btrfs_release_path(path); in btrfs_add_root_ref()
464 btrfs_free_path(path); in btrfs_add_root_ref()