Lines Matching refs:path

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