Lines Matching refs:path
23 struct btrfs_path *path;
35 path = btrfs_alloc_path();
36 if (!path) {
41 ret = btrfs_insert_empty_item(&trans, root, path, &ins, size);
44 btrfs_free_path(path);
48 leaf = path->nodes[0];
49 item = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_extent_item);
64 btrfs_free_path(path);
73 struct btrfs_path *path;
84 path = btrfs_alloc_path();
85 if (!path) {
90 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1);
93 btrfs_free_path(path);
97 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
99 refs = btrfs_extent_refs(path->nodes[0], item);
100 btrfs_set_extent_refs(path->nodes[0], item, refs + 1);
101 btrfs_release_path(path);
112 ret = btrfs_insert_empty_item(&trans, root, path, &key, 0);
115 btrfs_free_path(path);
124 struct btrfs_path *path;
133 path = btrfs_alloc_path();
134 if (!path) {
139 ret = btrfs_search_slot(&trans, root, &key, path, -1, 1);
142 btrfs_free_path(path);
145 btrfs_del_item(&trans, root, path);
146 btrfs_free_path(path);
155 struct btrfs_path *path;
166 path = btrfs_alloc_path();
167 if (!path) {
172 ret = btrfs_search_slot(&trans, root, &key, path, 0, 1);
175 btrfs_free_path(path);
179 item = btrfs_item_ptr(path->nodes[0], path->slots[0],
181 refs = btrfs_extent_refs(path->nodes[0], item);
182 btrfs_set_extent_refs(path->nodes[0], item, refs - 1);
183 btrfs_release_path(path);
194 ret = btrfs_search_slot(&trans, root, &key, path, -1, 1);
197 btrfs_free_path(path);
200 btrfs_del_item(&trans, root, path);
201 btrfs_free_path(path);