Lines Matching refs:path

822 	pending_snapshot->path = btrfs_alloc_path();
823 if (!pending_snapshot->root_item || !pending_snapshot->path) {
892 btrfs_free_path(pending_snapshot->path);
965 static noinline int btrfs_mksubvol(const struct path *parent,
1020 static noinline int btrfs_mksnapshot(const struct path *parent,
1103 struct btrfs_path *path;
1111 path = btrfs_alloc_path();
1112 if (!path)
1120 ret = btrfs_search_forward(root, &min_key, path, newer_than);
1129 leaf = path->nodes[0];
1130 extent = btrfs_item_ptr(leaf, path->slots[0],
1138 btrfs_free_path(path);
1142 path->slots[0]++;
1143 if (path->slots[0] < btrfs_header_nritems(leaf)) {
1144 btrfs_item_key_to_cpu(leaf, &min_key, path->slots[0]);
1152 btrfs_release_path(path);
1155 btrfs_free_path(path);
2116 static noinline int copy_to_sk(struct btrfs_path *path,
2135 leaf = path->nodes[0];
2136 slot = path->slots[0];
2257 struct btrfs_path *path;
2267 path = btrfs_alloc_path();
2268 if (!path)
2277 btrfs_free_path(path);
2292 ret = btrfs_search_forward(root, &key, path, sk->min_transid);
2298 ret = copy_to_sk(path, &key, sk, buf_size, ubuf,
2300 btrfs_release_path(path);
2310 btrfs_free_path(path);
2385 * Search INODE_REFs to identify path name of 'dirid' directory
2386 * in a 'tree_id' tree. and sets path name to 'name'.
2400 struct btrfs_path *path;
2407 path = btrfs_alloc_path();
2408 if (!path)
2425 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
2429 ret = btrfs_previous_item(root, path, dirid,
2439 l = path->nodes[0];
2440 slot = path->slots[0];
2458 btrfs_release_path(path);
2468 btrfs_free_path(path);
2485 struct btrfs_path *path;
2495 path = btrfs_alloc_path();
2496 if (!path)
2501 * construct the path in from the bottom up.
2504 ptr = &args->path[BTRFS_INO_LOOKUP_USER_PATH_MAX - 1];
2516 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
2520 ret = btrfs_previous_item(root, path, dirid,
2530 leaf = path->nodes[0];
2531 slot = path->slots[0];
2538 if (ptr < args->path) {
2548 ret = btrfs_previous_item(root, path, dirid,
2557 leaf = path->nodes[0];
2558 slot = path->slots[0];
2566 * We don't need the path anymore, so release it and
2571 btrfs_release_path(path);
2596 memmove(args->path, ptr, total_len);
2597 args->path[total_len] = '\0';
2600 btrfs_release_path(path);
2607 ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0);
2615 leaf = path->nodes[0];
2616 slot = path->slots[0];
2637 btrfs_free_path(path);
2656 * path is reset so it's consistent with btrfs_search_path_in_tree.
2689 * path construction. -EACCES will be returned in case of failure.
2691 * to the fd with which this ioctl is called. If constructed path does not
2732 struct btrfs_path *path;
2743 path = btrfs_alloc_path();
2744 if (!path)
2749 btrfs_free_path(path);
2796 ret = btrfs_search_slot(NULL, fs_info->tree_root, &key, path, 0, 0);
2799 } else if (path->slots[0] >=
2800 btrfs_header_nritems(path->nodes[0])) {
2801 ret = btrfs_next_leaf(fs_info->tree_root, path);
2810 leaf = path->nodes[0];
2811 slot = path->slots[0];
2832 btrfs_free_path(path);
2833 path = NULL;
2840 btrfs_free_path(path);
2854 struct btrfs_path *path;
2863 path = btrfs_alloc_path();
2864 if (!path)
2869 btrfs_free_path(path);
2882 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
2885 } else if (path->slots[0] >=
2886 btrfs_header_nritems(path->nodes[0])) {
2887 ret = btrfs_next_leaf(root, path);
2896 leaf = path->nodes[0];
2897 slot = path->slots[0];
2916 ret = btrfs_next_item(root, path);
2926 btrfs_free_path(path);
3427 strscpy(di_args->path, rcu_str_deref(dev->name), sizeof(di_args->path));
3429 di_args->path[0] = '\0';
3448 struct btrfs_path *path = NULL;
3479 path = btrfs_alloc_path();
3480 if (!path) {
3484 path->leave_spinning = 1;
3493 di = btrfs_lookup_dir_item(trans, fs_info->tree_root, path,
3496 btrfs_release_path(path);
3505 btrfs_set_dir_item_key(path->nodes[0], di, &disk_key);
3506 btrfs_mark_buffer_dirty(path->nodes[0]);
3507 btrfs_release_path(path);
3513 btrfs_free_path(path);
3872 struct btrfs_path *path;
3877 path = btrfs_alloc_path();
3878 if (!path) {
3891 ipath = init_ipath(size, root, path);
3908 btrfs_free_path(path);
3909 path = NULL;
3918 btrfs_free_path(path);
3932 struct btrfs_path *path = NULL;
3966 path = btrfs_alloc_path();
3967 if (!path) {
3971 ret = iterate_inodes_from_logical(loi->logical, fs_info, path,
3973 btrfs_free_path(path);