Lines Matching defs:path
57 * path: the path we search
68 struct btrfs_path *path, struct btrfs_root_item *root_item,
76 ret = btrfs_search_slot(NULL, root, search_key, path, 0, 0);
92 if (path->slots[0] == 0)
94 path->slots[0]--;
98 l = path->nodes[0];
99 slot = path->slots[0];
113 btrfs_release_path(path);
133 BTRFS_PATH_AUTO_FREE(path);
140 path = btrfs_alloc_path();
141 if (!path)
144 ret = btrfs_search_slot(trans, root, key, path, 0, 1);
157 l = path->nodes[0];
158 slot = path->slots[0];
168 btrfs_release_path(path);
169 ret = btrfs_search_slot(trans, root, key, path,
176 ret = btrfs_del_item(trans, root, path);
181 btrfs_release_path(path);
182 ret = btrfs_insert_empty_item(trans, root, path,
188 l = path->nodes[0];
189 slot = path->slots[0];
217 BTRFS_PATH_AUTO_FREE(path);
223 path = btrfs_alloc_path();
224 if (!path)
234 ret = btrfs_search_slot(NULL, tree_root, &key, path, 0, 0);
240 leaf = path->nodes[0];
241 if (path->slots[0] >= btrfs_header_nritems(leaf)) {
242 ret = btrfs_next_leaf(tree_root, path);
247 leaf = path->nodes[0];
250 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
251 btrfs_release_path(path);
267 btrfs_release_path(path);
318 BTRFS_PATH_AUTO_FREE(path);
321 path = btrfs_alloc_path();
322 if (!path)
324 ret = btrfs_search_slot(trans, root, key, path, -1, 1);
331 return btrfs_del_item(trans, root, path);
339 BTRFS_PATH_AUTO_FREE(path);
346 path = btrfs_alloc_path();
347 if (!path)
354 ret = btrfs_search_slot(trans, tree_root, &key, path, -1, 1);
358 leaf = path->nodes[0];
359 ref = btrfs_item_ptr(leaf, path->slots[0],
369 ret = btrfs_del_item(trans, tree_root, path);
377 btrfs_release_path(path);
400 * Will return 0, -ENOMEM, or anything from the CoW path
409 BTRFS_PATH_AUTO_FREE(path);
414 path = btrfs_alloc_path();
415 if (!path)
422 ret = btrfs_insert_empty_item(trans, tree_root, path, &key,
429 leaf = path->nodes[0];
430 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref);
438 btrfs_release_path(path);