Lines Matching defs:path
102 struct btrfs_path *path, u64 objectid);
106 struct btrfs_path *path,
334 * root is the tree we are copying into, and path is a scratch
335 * path for use in this function (it should be released on entry and
346 struct btrfs_path *path,
366 ret = btrfs_search_slot(NULL, root, key, path, 0, 0);
373 u32 dst_size = btrfs_item_size_nr(path->nodes[0],
374 path->slots[0]);
379 btrfs_release_path(path);
385 btrfs_release_path(path);
393 dst_ptr = btrfs_item_ptr_offset(path->nodes[0], path->slots[0]);
394 read_extent_buffer(path->nodes[0], dst_copy, dst_ptr,
407 btrfs_release_path(path);
420 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
422 nbytes = btrfs_inode_nbytes(path->nodes[0], item);
457 btrfs_release_path(path);
459 path->skip_release_on_error = 1;
460 ret = btrfs_insert_empty_item(trans, root, path,
462 path->skip_release_on_error = 0;
467 found_size = btrfs_item_size_nr(path->nodes[0],
468 path->slots[0]);
470 btrfs_truncate_item(path, item_size, 1);
472 btrfs_extend_item(path, item_size - found_size);
476 dst_ptr = btrfs_item_ptr_offset(path->nodes[0],
477 path->slots[0]);
496 struct extent_buffer *dst_eb = path->nodes[0];
515 S_ISDIR(btrfs_inode_mode(path->nodes[0], dst_item))) {
517 saved_i_size = btrfs_inode_size(path->nodes[0],
522 copy_extent_buffer(path->nodes[0], eb, dst_ptr,
528 btrfs_set_inode_size(path->nodes[0], dst_item, saved_i_size);
535 if (btrfs_inode_generation(path->nodes[0], dst_item) == 0) {
536 btrfs_set_inode_generation(path->nodes[0], dst_item,
541 btrfs_mark_buffer_dirty(path->nodes[0]);
542 btrfs_release_path(path);
562 * subvolume 'root'. path is released on entry and should be released
575 struct btrfs_path *path,
624 ret = btrfs_lookup_file_extent(trans, root, path,
635 leaf = path->nodes[0];
636 existing = btrfs_item_ptr(leaf, path->slots[0],
649 btrfs_release_path(path);
653 btrfs_release_path(path);
670 ret = btrfs_insert_empty_item(trans, root, path, key,
674 dest_offset = btrfs_item_ptr_offset(path->nodes[0],
675 path->slots[0]);
676 copy_extent_buffer(path->nodes[0], eb, dest_offset,
734 btrfs_release_path(path);
819 btrfs_release_path(path);
823 ret = overwrite_item(trans, root, path, eb, slot, key);
852 struct btrfs_path *path,
863 leaf = path->nodes[0];
872 btrfs_release_path(path);
880 ret = link_to_fixup_dir(trans, root, path, location.objectid);
904 struct btrfs_path *path,
912 di = btrfs_lookup_dir_index_item(NULL, root, path, dirid,
919 btrfs_dir_item_key_to_cpu(path->nodes[0], di, &location);
926 btrfs_release_path(path);
927 di = btrfs_lookup_dir_item(NULL, root, path, dirid, name, name_len, 0);
932 btrfs_dir_item_key_to_cpu(path->nodes[0], di, &location);
937 btrfs_release_path(path);
956 struct btrfs_path *path;
959 path = btrfs_alloc_path();
960 if (!path)
963 ret = btrfs_search_slot(NULL, log, key, path, 0, 0);
972 ret = !!btrfs_find_name_in_ext_backref(path->nodes[0],
973 path->slots[0],
977 ret = !!btrfs_find_name_in_backref(path->nodes[0],
978 path->slots[0],
981 btrfs_free_path(path);
987 struct btrfs_path *path,
1008 ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0);
1014 leaf = path->nodes[0];
1026 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]);
1027 ptr_end = ptr + btrfs_item_size_nr(leaf, path->slots[0]);
1048 btrfs_release_path(path);
1072 btrfs_release_path(path);
1075 extref = btrfs_lookup_inode_extref(NULL, root, path, name, namelen,
1086 leaf = path->nodes[0];
1088 item_size = btrfs_item_size_nr(leaf, path->slots[0]);
1089 base = btrfs_item_ptr_offset(leaf, path->slots[0]);
1122 btrfs_release_path(path);
1146 btrfs_release_path(path);
1149 di = btrfs_lookup_dir_index_item(trans, root, path, btrfs_ino(dir),
1155 ret = drop_one_dir_item(trans, root, path, dir, di);
1159 btrfs_release_path(path);
1162 di = btrfs_lookup_dir_item(trans, root, path, btrfs_ino(dir),
1167 ret = drop_one_dir_item(trans, root, path, dir, di);
1171 btrfs_release_path(path);
1229 struct btrfs_path *path,
1241 btrfs_release_path(path);
1242 ret = btrfs_search_slot(NULL, root, key, path, 0, 0);
1250 eb = path->nodes[0];
1251 ref_ptr = btrfs_item_ptr_offset(eb, path->slots[0]);
1252 ref_end = ref_ptr + btrfs_item_size_nr(eb, path->slots[0]);
1280 btrfs_release_path(path);
1314 btrfs_release_path(path);
1323 struct btrfs_path *path;
1327 path = btrfs_alloc_path();
1328 if (!path)
1338 ret = btrfs_search_slot(NULL, BTRFS_I(inode)->root, &key, path, 0, 0);
1346 ret = !!btrfs_find_name_in_ext_backref(path->nodes[0],
1347 path->slots[0], parent_id, name, namelen);
1349 ret = !!btrfs_find_name_in_backref(path->nodes[0], path->slots[0],
1353 btrfs_free_path(path);
1363 struct btrfs_path *path;
1367 path = btrfs_alloc_path();
1368 if (!path)
1371 dir_item = btrfs_lookup_dir_item(NULL, root, path,
1375 btrfs_release_path(path);
1387 btrfs_dir_item_key_to_cpu(path->nodes[0], dir_item, &key);
1388 btrfs_release_path(path);
1413 btrfs_free_path(path);
1421 * root is the destination we are replaying into, and path is for temp
1427 struct btrfs_path *path,
1500 ret = inode_in_dir(root, path, btrfs_ino(BTRFS_I(dir)),
1515 ret = __add_inode_ref(trans, root, path, log,
1591 ret = unlink_old_inode_refs(trans, root, path, BTRFS_I(inode), eb, slot,
1597 ret = overwrite_item(trans, root, path, eb, slot, key);
1599 btrfs_release_path(path);
1619 struct btrfs_inode *inode, struct btrfs_path *path)
1633 ret = btrfs_find_one_extref(root, inode_objectid, offset, path,
1638 leaf = path->nodes[0];
1639 item_size = btrfs_item_size_nr(leaf, path->slots[0]);
1640 ptr = btrfs_item_ptr_offset(leaf, path->slots[0]);
1653 btrfs_release_path(path);
1655 btrfs_release_path(path);
1663 struct btrfs_inode *inode, struct btrfs_path *path)
1678 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
1682 if (path->slots[0] == 0)
1684 path->slots[0]--;
1687 btrfs_item_key_to_cpu(path->nodes[0], &key,
1688 path->slots[0]);
1692 ptr = btrfs_item_ptr_offset(path->nodes[0], path->slots[0]);
1693 ptr_end = ptr + btrfs_item_size_nr(path->nodes[0],
1694 path->slots[0]);
1699 name_len = btrfs_inode_ref_name_len(path->nodes[0],
1707 if (path->slots[0] > 0) {
1708 path->slots[0]--;
1712 btrfs_release_path(path);
1714 btrfs_release_path(path);
1733 struct btrfs_path *path;
1738 path = btrfs_alloc_path();
1739 if (!path)
1742 ret = count_inode_refs(root, BTRFS_I(inode), path);
1748 ret = count_inode_extrefs(root, BTRFS_I(inode), path);
1764 ret = replay_dir_deletes(trans, root, NULL, path,
1773 btrfs_free_path(path);
1779 struct btrfs_path *path)
1789 ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
1795 if (path->slots[0] == 0)
1797 path->slots[0]--;
1800 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
1805 ret = btrfs_del_item(trans, root, path);
1809 btrfs_release_path(path);
1828 btrfs_release_path(path);
1840 struct btrfs_path *path,
1855 ret = btrfs_insert_empty_item(trans, root, path, &key, 0);
1857 btrfs_release_path(path);
1925 struct btrfs_path *path,
1958 ret = btrfs_lookup_inode(trans, root, path, &log_key, 0);
1959 btrfs_release_path(path);
1966 dst_di = btrfs_lookup_dir_item(trans, root, path, key->objectid,
1969 dst_di = btrfs_lookup_dir_index_item(trans, root, path,
1994 btrfs_dir_item_key_to_cpu(path->nodes[0], dst_di, &found_key);
1999 btrfs_dir_type(path->nodes[0], dst_di) == log_type) {
2011 ret = drop_one_dir_item(trans, root, path, BTRFS_I(dir), dst_di);
2018 btrfs_release_path(path);
2060 btrfs_release_path(path);
2080 struct btrfs_path *path,
2097 ret = replay_one_name(trans, root, path, eb, di, key);
2165 struct btrfs_path *path,
2182 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
2186 if (path->slots[0] == 0)
2188 path->slots[0]--;
2191 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
2197 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
2199 found_end = btrfs_dir_log_end(path->nodes[0], item);
2210 nritems = btrfs_header_nritems(path->nodes[0]);
2211 path->slots[0]++;
2212 if (path->slots[0] >= nritems) {
2213 ret = btrfs_next_leaf(root, path);
2218 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
2224 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
2226 found_end = btrfs_dir_log_end(path->nodes[0], item);
2231 btrfs_release_path(path);
2243 struct btrfs_path *path,
2262 eb = path->nodes[0];
2263 slot = path->slots[0];
2291 btrfs_release_path(path);
2300 path, location.objectid);
2320 ret = btrfs_search_slot(NULL, root, dir_key, path,
2338 btrfs_release_path(path);
2346 struct btrfs_path *path,
2363 ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0);
2367 nritems = btrfs_header_nritems(path->nodes[0]);
2368 for (i = path->slots[0]; i < nritems; i++) {
2375 btrfs_item_key_to_cpu(path->nodes[0], &key, i);
2381 di = btrfs_item_ptr(path->nodes[0], i, struct btrfs_dir_item);
2382 total_size = btrfs_item_size_nr(path->nodes[0], i);
2385 u16 name_len = btrfs_dir_name_len(path->nodes[0], di);
2386 u16 data_len = btrfs_dir_data_len(path->nodes[0], di);
2395 read_extent_buffer(path->nodes[0], name,
2403 btrfs_release_path(path);
2404 di = btrfs_lookup_xattr(trans, root, path, ino,
2413 path, di);
2416 btrfs_release_path(path);
2429 ret = btrfs_next_leaf(root, path);
2436 btrfs_release_path(path);
2454 struct btrfs_path *path,
2488 ret = find_dir_range(log, path, dirid, key_type,
2499 ret = btrfs_search_slot(NULL, root, &dir_key, path,
2504 nritems = btrfs_header_nritems(path->nodes[0]);
2505 if (path->slots[0] >= nritems) {
2506 ret = btrfs_next_leaf(root, path);
2512 btrfs_item_key_to_cpu(path->nodes[0], &found_key,
2513 path->slots[0]);
2521 ret = check_item_in_log(trans, root, log, path,
2530 btrfs_release_path(path);
2541 btrfs_release_path(path);
2545 btrfs_release_path(path);
2566 struct btrfs_path *path;
2581 path = btrfs_alloc_path();
2582 if (!path)
2612 path, key.objectid);
2618 root, log, path, key.objectid, 0);
2622 ret = overwrite_item(wc->trans, root, path,
2659 path, key.objectid);
2669 ret = replay_one_dir_item(wc->trans, root, path,
2680 ret = overwrite_item(wc->trans, root, path,
2686 ret = add_inode_ref(wc->trans, root, log, path,
2692 ret = replay_one_extent(wc->trans, root, path,
2697 ret = replay_one_dir_item(wc->trans, root, path,
2703 btrfs_free_path(path);
2732 struct btrfs_path *path, int *level,
2746 cur = path->nodes[*level];
2750 if (path->slots[*level] >=
2754 bytenr = btrfs_node_blockptr(cur, path->slots[*level]);
2755 ptr_gen = btrfs_node_ptr_generation(cur, path->slots[*level]);
2756 btrfs_node_key_to_cpu(cur, &first_key, path->slots[*level]);
2771 path->slots[*level]++;
2807 if (path->nodes[*level-1])
2808 free_extent_buffer(path->nodes[*level-1]);
2809 path->nodes[*level-1] = next;
2811 path->slots[*level] = 0;
2814 path->slots[*level] = btrfs_header_nritems(path->nodes[*level]);
2822 struct btrfs_path *path, int *level,
2830 for (i = *level; i < BTRFS_MAX_LEVEL - 1 && path->nodes[i]; i++) {
2831 slot = path->slots[i];
2832 if (slot + 1 < btrfs_header_nritems(path->nodes[i])) {
2833 path->slots[i]++;
2838 ret = wc->process_func(root, path->nodes[*level], wc,
2839 btrfs_header_generation(path->nodes[*level]),
2847 next = path->nodes[*level];
2856 path->nodes[*level]->start,
2857 path->nodes[*level]->len);
2865 path->nodes[*level]->start);
2868 free_extent_buffer(path->nodes[*level]);
2869 path->nodes[*level] = NULL;
2888 struct btrfs_path *path;
2891 path = btrfs_alloc_path();
2892 if (!path)
2897 path->nodes[level] = log->node;
2899 path->slots[level] = 0;
2902 wret = walk_down_log_tree(trans, log, path, &level, wc);
2910 wret = walk_up_log_tree(trans, log, path, &level, wc);
2920 if (path->nodes[orig_level]) {
2921 ret = wc->process_func(log, path->nodes[orig_level], wc,
2922 btrfs_header_generation(path->nodes[orig_level]),
2929 next = path->nodes[orig_level];
2950 btrfs_free_path(path);
3406 struct btrfs_path *path;
3422 path = btrfs_alloc_path();
3423 if (!path) {
3428 di = btrfs_lookup_dir_item(trans, log, path, dir_ino,
3435 ret = btrfs_delete_one_dir_name(trans, log, path, di);
3442 btrfs_release_path(path);
3443 di = btrfs_lookup_dir_index_item(trans, log, path, dir_ino,
3450 ret = btrfs_delete_one_dir_name(trans, log, path, di);
3467 btrfs_release_path(path);
3469 ret = btrfs_search_slot(trans, log, &key, path, 0, 1);
3478 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
3480 i_size = btrfs_inode_size(path->nodes[0], item);
3485 btrfs_set_inode_size(path->nodes[0], item, i_size);
3486 btrfs_mark_buffer_dirty(path->nodes[0]);
3489 btrfs_release_path(path);
3492 btrfs_free_path(path);
3547 struct btrfs_path *path,
3561 ret = btrfs_insert_empty_item(trans, log, path, &key, sizeof(*item));
3565 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
3567 btrfs_set_dir_log_end(path->nodes[0], item, last_offset);
3568 btrfs_mark_buffer_dirty(path->nodes[0]);
3569 btrfs_release_path(path);
3580 struct btrfs_path *path,
3602 ret = btrfs_search_forward(root, &min_key, path, trans->transid);
3612 btrfs_release_path(path);
3613 ret = btrfs_search_slot(NULL, root, &min_key, path, 0, 0);
3615 btrfs_release_path(path);
3618 ret = btrfs_previous_item(root, path, ino, key_type);
3627 btrfs_item_key_to_cpu(path->nodes[0], &tmp,
3628 path->slots[0]);
3636 ret = btrfs_previous_item(root, path, ino, key_type);
3639 btrfs_item_key_to_cpu(path->nodes[0], &tmp, path->slots[0]);
3643 path->nodes[0], path->slots[0],
3651 btrfs_release_path(path);
3662 ret = btrfs_search_slot(NULL, root, &min_key, path, 0, 0);
3672 src = path->nodes[0];
3674 for (i = path->slots[0]; i < nritems; i++) {
3683 btrfs_release_path(path);
3726 path->slots[0] = nritems;
3732 ret = btrfs_next_leaf(root, path);
3740 btrfs_item_key_to_cpu(path->nodes[0], &tmp, path->slots[0]);
3745 if (btrfs_header_generation(path->nodes[0]) != trans->transid) {
3747 path->nodes[0], path->slots[0],
3757 btrfs_release_path(path);
3766 ret = insert_dir_log_key(trans, log, path, key_type,
3788 struct btrfs_path *path,
3801 ret = log_dir_items(trans, root, inode, path, dst_path, key_type,
3825 struct btrfs_path *path,
3838 ret = btrfs_search_slot(trans, log, &key, path, -1, 1);
3843 if (path->slots[0] == 0)
3846 path->slots[0]--;
3847 btrfs_item_key_to_cpu(path->nodes[0], &found_key,
3848 path->slots[0]);
3855 ret = btrfs_bin_search(path->nodes[0], &found_key, &start_slot);
3859 ret = btrfs_del_items(trans, log, path, start_slot,
3860 path->slots[0] - start_slot + 1);
3867 btrfs_release_path(path);
3869 btrfs_release_path(path);
3929 struct btrfs_root *log, struct btrfs_path *path,
3935 ret = btrfs_insert_empty_item(trans, log, path,
3939 inode_item = btrfs_item_ptr(path->nodes[0], path->slots[0],
3941 fill_inode_item(trans, path->nodes[0], inode_item, &inode->vfs_inode,
3943 btrfs_release_path(path);
3958 * transaction with new extents, then do the fast path, no need to
4244 struct btrfs_path *path,
4261 ret = __btrfs_drop_extents(trans, log, inode, path, em->start,
4272 ret = btrfs_insert_empty_item(trans, log, path, &key,
4277 leaf = path->nodes[0];
4279 fi = btrfs_item_ptr(leaf, path->slots[0],
4313 btrfs_release_path(path);
4328 struct btrfs_path *path)
4349 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
4361 ret = btrfs_previous_item(root, path, ino, BTRFS_EXTENT_DATA_KEY);
4368 leaf = path->nodes[0];
4369 slot = path->slots[0];
4388 leaf = path->nodes[0];
4389 slot = path->slots[0];
4393 ret = copy_items(trans, inode, dst_path, path,
4399 ret = btrfs_next_leaf(root, path);
4415 path->slots[0]++;
4437 path->slots[0]++;
4447 ret = copy_items(trans, inode, dst_path, path,
4450 btrfs_release_path(path);
4458 struct btrfs_path *path,
4523 ret = log_one_extent(trans, inode, root, em, path, ctx);
4531 btrfs_release_path(path);
4533 ret = btrfs_log_prealloc_extents(trans, inode, path);
4563 struct btrfs_path *path, u64 *size_ret)
4572 ret = btrfs_search_slot(NULL, log, &key, path, 0, 0);
4580 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
4582 *size_ret = btrfs_inode_size(path->nodes[0], item);
4598 btrfs_release_path(path);
4614 struct btrfs_path *path,
4631 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
4636 int slot = path->slots[0];
4637 struct extent_buffer *leaf = path->nodes[0];
4642 ret = copy_items(trans, inode, dst_path, path,
4648 ret = btrfs_next_leaf(root, path);
4663 path->slots[0]++;
4668 ret = copy_items(trans, inode, dst_path, path,
4692 struct btrfs_path *path)
4708 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
4713 struct extent_buffer *leaf = path->nodes[0];
4715 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) {
4716 ret = btrfs_next_leaf(root, path);
4723 leaf = path->nodes[0];
4726 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]);
4735 * Release the path to avoid deadlocks with other code
4739 btrfs_release_path(path);
4754 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
4759 leaf = path->nodes[0];
4762 prev_extent_end = btrfs_file_extent_end(path);
4763 path->slots[0]++;
4770 btrfs_release_path(path);
4926 struct btrfs_path *path,
4955 btrfs_release_path(path);
5040 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
5047 struct extent_buffer *leaf = path->nodes[0];
5048 int slot = path->slots[0];
5053 ret = btrfs_next_leaf(root, path);
5087 path->slots[0]++;
5099 struct btrfs_path *path,
5114 ret = btrfs_search_forward(root, min_key, path, trans->transid);
5146 ret = btrfs_check_ref_name_override(path->nodes[0],
5147 path->slots[0], min_key, inode,
5157 ins_start_slot = path->slots[0];
5159 ret = copy_items(trans, inode, dst_path, path,
5166 ret = log_conflicting_inodes(trans, root, path,
5170 btrfs_release_path(path);
5177 ret = copy_items(trans, inode, dst_path, path,
5186 if (ins_nr && ins_start_slot + ins_nr == path->slots[0]) {
5190 ins_start_slot = path->slots[0];
5195 ret = copy_items(trans, inode, dst_path, path, ins_start_slot,
5200 ins_start_slot = path->slots[0];
5202 path->slots[0]++;
5203 if (path->slots[0] < btrfs_header_nritems(path->nodes[0])) {
5204 btrfs_item_key_to_cpu(path->nodes[0], min_key,
5205 path->slots[0]);
5209 ret = copy_items(trans, inode, dst_path, path,
5216 btrfs_release_path(path);
5228 ret = copy_items(trans, inode, dst_path, path, ins_start_slot,
5236 * Release the path because otherwise we might attempt to double
5239 btrfs_release_path(path);
5265 struct btrfs_path *path;
5280 path = btrfs_alloc_path();
5281 if (!path)
5285 btrfs_free_path(path);
5323 btrfs_free_path(path);
5360 ret = drop_objectid_items(trans, log, path, ino, max_key_type);
5376 err = logged_inode_size(log, inode, path, &logged_isize);
5384 ret = drop_objectid_items(trans, log, path, ino,
5404 ret = drop_objectid_items(trans, log, path, ino,
5419 path, dst_path, logged_isize,
5425 btrfs_release_path(path);
5427 err = btrfs_log_all_xattrs(trans, root, inode, path, dst_path);
5432 btrfs_release_path(path);
5434 err = btrfs_log_holes(trans, root, inode, path);
5439 btrfs_release_path(path);
5444 err = btrfs_log_all_xattrs(trans, root, inode, path,
5446 btrfs_release_path(path);
5468 ret = log_directory_changes(trans, root, inode, path, dst_path,
5508 btrfs_free_path(path);
5662 struct btrfs_path *path;
5667 path = btrfs_alloc_path();
5668 if (!path)
5673 btrfs_free_path(path);
5694 btrfs_release_path(path);
5695 ret = btrfs_search_forward(log, &min_key, path, trans->transid);
5704 leaf = path->nodes[0];
5706 for (i = path->slots[0]; i < nritems; i++) {
5728 btrfs_release_path(path);
5764 ret = btrfs_next_leaf(log, path);
5782 btrfs_free_path(path);
5792 struct btrfs_path *path;
5797 path = btrfs_alloc_path();
5798 if (!path)
5800 path->skip_locking = 1;
5801 path->search_commit_root = 1;
5806 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
5811 struct extent_buffer *leaf = path->nodes[0];
5812 int slot = path->slots[0];
5818 ret = btrfs_next_leaf(root, path);
5899 path->slots[0]++;
5903 btrfs_free_path(path);
5909 struct btrfs_path *path,
5914 btrfs_item_key_to_cpu(path->nodes[0], &found_key, path->slots[0]);
5919 struct extent_buffer *leaf = path->nodes[0];
5920 int slot = path->slots[0];
5926 btrfs_release_path(path);
5948 ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0);
5952 leaf = path->nodes[0];
5953 slot = path->slots[0];
5955 ret = btrfs_next_leaf(root, path);
5960 leaf = path->nodes[0];
5961 slot = path->slots[0];
6017 struct btrfs_path *path;
6022 * For a single hard link case, go through a fast path that does not
6028 path = btrfs_alloc_path();
6029 if (!path)
6036 ret = btrfs_search_slot(NULL, root, &search_key, path, 0, 0);
6040 path->slots[0]++;
6043 struct extent_buffer *leaf = path->nodes[0];
6044 int slot = path->slots[0];
6048 ret = btrfs_next_leaf(root, path);
6075 * tree, so it releases the path as needed to avoid deadlocks.
6081 ret = log_new_ancestors(trans, root, path, ctx);
6084 btrfs_release_path(path);
6089 btrfs_free_path(path);
6270 struct btrfs_path *path;
6281 path = btrfs_alloc_path();
6282 if (!path)
6309 ret = btrfs_search_slot(NULL, log_root_tree, &key, path, 0, 0);
6317 if (path->slots[0] == 0)
6319 path->slots[0]--;
6321 btrfs_item_key_to_cpu(path->nodes[0], &found_key,
6322 path->slots[0]);
6323 btrfs_release_path(path);
6370 path);
6376 btrfs_release_path(path);
6401 btrfs_release_path(path);
6416 btrfs_free_path(path);
6432 btrfs_free_path(path);