Lines Matching refs:path

165 				    struct btrfs_path *path,
191 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
195 if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) {
196 ret = btrfs_next_leaf(root, path);
202 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
215 ei = btrfs_item_ptr(path->nodes[0], path->slots[0],
222 if (btrfs_file_extent_type(path->nodes[0], ei) ==
245 * Release path before starting a new transaction so we don't hold locks
248 btrfs_release_path(path);
267 ret = btrfs_insert_empty_item(trans, root, path, new_key, size);
271 write_extent_buffer(path->nodes[0], inline_data,
272 btrfs_item_ptr_offset(path->nodes[0],
273 path->slots[0]),
303 * Release our path because we don't need it anymore and also because
310 btrfs_release_path(path);
333 struct btrfs_path *path = NULL;
349 path = btrfs_alloc_path();
350 if (!path) {
355 path->reada = READA_FORWARD;
374 path->leave_spinning = 1;
375 ret = btrfs_search_slot(NULL, BTRFS_I(src)->root, &key, path,
384 if (key.offset == off && ret > 0 && path->slots[0] > 0) {
385 btrfs_item_key_to_cpu(path->nodes[0], &key,
386 path->slots[0] - 1);
388 path->slots[0]--;
391 nritems = btrfs_header_nritems(path->nodes[0]);
393 if (path->slots[0] >= nritems) {
394 ret = btrfs_next_leaf(BTRFS_I(src)->root, path);
399 nritems = btrfs_header_nritems(path->nodes[0]);
401 leaf = path->nodes[0];
402 slot = path->slots[0];
433 path->slots[0]++;
443 btrfs_release_path(path);
444 path->leave_spinning = 0;
490 ret = btrfs_replace_file_extents(inode, path, drop_start,
512 ret = clone_copy_inline_extent(inode, path, &new_key,
519 btrfs_release_path(path);
543 btrfs_release_path(path);
562 btrfs_release_path(path);
563 path->leave_spinning = 0;
583 ret = btrfs_replace_file_extents(inode, path, last_dest_end,
593 btrfs_free_path(path);