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()
92 if (path->slots[0] == 0) in btrfs_find_root()
94 path->slots[0]--; in btrfs_find_root()
98 l = path->nodes[0]; in btrfs_find_root()
99 slot = path->slots[0]; in btrfs_find_root()
113 btrfs_release_path(path); in btrfs_find_root()
133 struct btrfs_path *path; in btrfs_update_root() local
140 path = btrfs_alloc_path(); in btrfs_update_root()
141 if (!path) in btrfs_update_root()
144 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
157 l = path->nodes[0]; in btrfs_update_root()
158 slot = path->slots[0]; in btrfs_update_root()
168 btrfs_release_path(path); in btrfs_update_root()
169 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
176 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
181 btrfs_release_path(path); in btrfs_update_root()
182 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
188 l = path->nodes[0]; in btrfs_update_root()
189 slot = path->slots[0]; in btrfs_update_root()
200 btrfs_mark_buffer_dirty(trans, path->nodes[0]); in btrfs_update_root()
202 btrfs_free_path(path); in btrfs_update_root()
220 struct btrfs_path *path; in btrfs_find_orphan_roots() local
226 path = btrfs_alloc_path(); in btrfs_find_orphan_roots()
227 if (!path) in btrfs_find_orphan_roots()
237 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
243 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
244 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
245 ret = btrfs_next_leaf(tree_root, path); in btrfs_find_orphan_roots()
250 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
253 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
254 btrfs_release_path(path); in btrfs_find_orphan_roots()
270 btrfs_release_path(path); in btrfs_find_orphan_roots()
313 btrfs_free_path(path); in btrfs_find_orphan_roots()
322 struct btrfs_path *path; in btrfs_del_root() local
325 path = btrfs_alloc_path(); in btrfs_del_root()
326 if (!path) in btrfs_del_root()
328 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
337 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
339 btrfs_free_path(path); in btrfs_del_root()
348 struct btrfs_path *path; in btrfs_del_root_ref() local
355 path = btrfs_alloc_path(); in btrfs_del_root_ref()
356 if (!path) in btrfs_del_root_ref()
363 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
367 leaf = path->nodes[0]; in btrfs_del_root_ref()
368 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
379 ret = btrfs_del_item(trans, tree_root, path); in btrfs_del_root_ref()
388 btrfs_release_path(path); in btrfs_del_root_ref()
396 btrfs_free_path(path); in btrfs_del_root_ref()
422 struct btrfs_path *path; in btrfs_add_root_ref() local
427 path = btrfs_alloc_path(); in btrfs_add_root_ref()
428 if (!path) in btrfs_add_root_ref()
435 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
439 btrfs_free_path(path); in btrfs_add_root_ref()
443 leaf = path->nodes[0]; in btrfs_add_root_ref()
444 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
453 btrfs_release_path(path); in btrfs_add_root_ref()
460 btrfs_free_path(path); in btrfs_add_root_ref()