Lines Matching refs:path

63 		    struct btrfs_path *path, struct btrfs_root_item *root_item,  in btrfs_find_root()  argument
71 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0); in btrfs_find_root()
80 if (path->slots[0] == 0) in btrfs_find_root()
82 path->slots[0]--; in btrfs_find_root()
86 l = path->nodes[0]; in btrfs_find_root()
87 slot = path->slots[0]; in btrfs_find_root()
101 btrfs_release_path(path); in btrfs_find_root()
121 struct btrfs_path *path; in btrfs_update_root() local
128 path = btrfs_alloc_path(); in btrfs_update_root()
129 if (!path) in btrfs_update_root()
132 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
146 l = path->nodes[0]; in btrfs_update_root()
147 slot = path->slots[0]; in btrfs_update_root()
157 btrfs_release_path(path); in btrfs_update_root()
158 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
165 ret = btrfs_del_item(trans, root, path); in btrfs_update_root()
170 btrfs_release_path(path); in btrfs_update_root()
171 ret = btrfs_insert_empty_item(trans, root, path, in btrfs_update_root()
177 l = path->nodes[0]; in btrfs_update_root()
178 slot = path->slots[0]; in btrfs_update_root()
189 btrfs_mark_buffer_dirty(path->nodes[0]); in btrfs_update_root()
191 btrfs_free_path(path); in btrfs_update_root()
209 struct btrfs_path *path; in btrfs_find_orphan_roots() local
215 path = btrfs_alloc_path(); in btrfs_find_orphan_roots()
216 if (!path) in btrfs_find_orphan_roots()
226 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0); in btrfs_find_orphan_roots()
232 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
233 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
234 ret = btrfs_next_leaf(tree_root, path); in btrfs_find_orphan_roots()
239 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
242 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
243 btrfs_release_path(path); in btrfs_find_orphan_roots()
259 btrfs_release_path(path); in btrfs_find_orphan_roots()
287 btrfs_free_path(path); in btrfs_find_orphan_roots()
296 struct btrfs_path *path; in btrfs_del_root() local
299 path = btrfs_alloc_path(); in btrfs_del_root()
300 if (!path) in btrfs_del_root()
302 ret = btrfs_search_slot(trans, root, key, path, -1, 1); in btrfs_del_root()
308 ret = btrfs_del_item(trans, root, path); in btrfs_del_root()
310 btrfs_free_path(path); in btrfs_del_root()
320 struct btrfs_path *path; in btrfs_del_root_ref() local
328 path = btrfs_alloc_path(); in btrfs_del_root_ref()
329 if (!path) in btrfs_del_root_ref()
336 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1); in btrfs_del_root_ref()
340 leaf = path->nodes[0]; in btrfs_del_root_ref()
341 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
352 ret = btrfs_del_item(trans, tree_root, path); in btrfs_del_root_ref()
361 btrfs_release_path(path); in btrfs_del_root_ref()
369 btrfs_free_path(path); in btrfs_del_root_ref()
395 struct btrfs_path *path; in btrfs_add_root_ref() local
400 path = btrfs_alloc_path(); in btrfs_add_root_ref()
401 if (!path) in btrfs_add_root_ref()
408 ret = btrfs_insert_empty_item(trans, tree_root, path, &key, in btrfs_add_root_ref()
412 btrfs_free_path(path); in btrfs_add_root_ref()
416 leaf = path->nodes[0]; in btrfs_add_root_ref()
417 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
426 btrfs_release_path(path); in btrfs_add_root_ref()
433 btrfs_free_path(path); in btrfs_add_root_ref()