Lines Matching refs:leaf
218 struct extent_buffer *leaf; in btrfs_find_orphan_roots() local
242 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
243 if (path->slots[0] >= btrfs_header_nritems(leaf)) { in btrfs_find_orphan_roots()
249 leaf = path->nodes[0]; in btrfs_find_orphan_roots()
252 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_find_orphan_roots()
349 struct extent_buffer *leaf; in btrfs_del_root_ref() local
366 leaf = path->nodes[0]; in btrfs_del_root_ref()
367 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
370 if ((btrfs_root_ref_dirid(leaf, ref) != dirid) || in btrfs_del_root_ref()
371 (btrfs_root_ref_name_len(leaf, ref) != name->len) || in btrfs_del_root_ref()
372 memcmp_extent_buffer(leaf, name->name, ptr, name->len)) { in btrfs_del_root_ref()
376 *sequence = btrfs_root_ref_sequence(leaf, ref); in btrfs_del_root_ref()
423 struct extent_buffer *leaf; in btrfs_add_root_ref() local
442 leaf = path->nodes[0]; in btrfs_add_root_ref()
443 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
444 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref()
445 btrfs_set_root_ref_sequence(leaf, ref, sequence); in btrfs_add_root_ref()
446 btrfs_set_root_ref_name_len(leaf, ref, name->len); in btrfs_add_root_ref()
448 write_extent_buffer(leaf, name->name, ptr, name->len); in btrfs_add_root_ref()