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()
201 btrfs_free_path(path); in btrfs_update_root()
219 struct btrfs_path *path; in btrfs_find_orphan_roots() local
225 path = btrfs_alloc_path(); in btrfs_find_orphan_roots()
226 if (!path) in btrfs_find_orphan_roots()
236 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
242 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
243 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
244 ret = btrfs_next_leaf(tree_root, path); in btrfs_find_orphan_roots()
249 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
252 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
253 btrfs_release_path(path); in btrfs_find_orphan_roots()
269 btrfs_release_path(path); in btrfs_find_orphan_roots()
312 btrfs_free_path(path); in btrfs_find_orphan_roots()
321 struct btrfs_path *path; in btrfs_del_root() local
324 path = btrfs_alloc_path(); in btrfs_del_root()
325 if (!path) in btrfs_del_root()
327 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
336 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
338 btrfs_free_path(path); in btrfs_del_root()
347 struct btrfs_path *path; in btrfs_del_root_ref() local
354 path = btrfs_alloc_path(); in btrfs_del_root_ref()
355 if (!path) in btrfs_del_root_ref()
362 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
366 leaf = path->nodes[0]; in btrfs_del_root_ref()
367 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
378 ret = btrfs_del_item(trans, tree_root, path); in btrfs_del_root_ref()
387 btrfs_release_path(path); in btrfs_del_root_ref()
395 btrfs_free_path(path); in btrfs_del_root_ref()
421 struct btrfs_path *path; in btrfs_add_root_ref() local
426 path = btrfs_alloc_path(); in btrfs_add_root_ref()
427 if (!path) in btrfs_add_root_ref()
434 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
438 btrfs_free_path(path); in btrfs_add_root_ref()
442 leaf = path->nodes[0]; in btrfs_add_root_ref()
443 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
451 btrfs_release_path(path); in btrfs_add_root_ref()
458 btrfs_free_path(path); in btrfs_add_root_ref()