Lines Matching refs:leaf
213 struct extent_buffer *leaf; in btrfs_find_orphan_roots() local
237 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
238 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
244 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
247 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
341 struct extent_buffer *leaf; in btrfs_del_root_ref() local
358 leaf = path->nodes[0]; in btrfs_del_root_ref()
359 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
362 if ((btrfs_root_ref_dirid(leaf, ref) != dirid) || in btrfs_del_root_ref()
363 (btrfs_root_ref_name_len(leaf, ref) != name->len) || in btrfs_del_root_ref()
364 memcmp_extent_buffer(leaf, name->name, ptr, name->len)) { in btrfs_del_root_ref()
368 *sequence = btrfs_root_ref_sequence(leaf, ref); in btrfs_del_root_ref()
415 struct extent_buffer *leaf; in btrfs_add_root_ref() local
434 leaf = path->nodes[0]; in btrfs_add_root_ref()
435 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
436 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref()
437 btrfs_set_root_ref_sequence(leaf, ref, sequence); in btrfs_add_root_ref()
438 btrfs_set_root_ref_name_len(leaf, ref, name->len); in btrfs_add_root_ref()
440 write_extent_buffer(leaf, name->name, ptr, name->len); in btrfs_add_root_ref()
441 btrfs_mark_buffer_dirty(leaf); in btrfs_add_root_ref()