Lines Matching refs:parent
146 if (!new_node->parent) { in hfs_brec_insert()
148 new_node->parent = tree->root; in hfs_brec_insert()
150 fd->bnode = hfs_bnode_find(tree, new_node->parent); in hfs_brec_insert()
179 struct hfs_bnode *node, *parent; in hfs_brec_remove() local
197 if (!node->parent) in hfs_brec_remove()
199 parent = hfs_bnode_find(tree, node->parent); in hfs_brec_remove()
200 if (IS_ERR(parent)) in hfs_brec_remove()
201 return PTR_ERR(parent); in hfs_brec_remove()
203 node = fd->bnode = parent; in hfs_brec_remove()
248 new_node->parent = node->parent; in hfs_bnode_split()
354 struct hfs_bnode *node, *new_node, *parent; in hfs_brec_update_parent() local
362 if (!node->parent) in hfs_brec_update_parent()
366 parent = hfs_bnode_find(tree, node->parent); in hfs_brec_update_parent()
367 if (IS_ERR(parent)) in hfs_brec_update_parent()
368 return PTR_ERR(parent); in hfs_brec_update_parent()
369 __hfs_brec_find(parent, fd); in hfs_brec_update_parent()
372 hfs_bnode_dump(parent); in hfs_brec_update_parent()
384 end_rec_off = tree->node_size - (parent->num_recs + 1) * 2; in hfs_brec_update_parent()
389 end_off = hfs_bnode_read_u16(parent, end_rec_off); in hfs_brec_update_parent()
393 fd->bnode = parent; in hfs_brec_update_parent()
397 parent = fd->bnode; in hfs_brec_update_parent()
400 end_rec_off = tree->node_size - (parent->num_recs + 1) * 2; in hfs_brec_update_parent()
404 end_off = start_off = hfs_bnode_read_u16(parent, rec_off); in hfs_brec_update_parent()
405 hfs_bnode_write_u16(parent, rec_off, start_off + diff); in hfs_brec_update_parent()
410 end_off = hfs_bnode_read_u16(parent, rec_off); in hfs_brec_update_parent()
411 hfs_bnode_write_u16(parent, rec_off, end_off + diff); in hfs_brec_update_parent()
413 hfs_bnode_move(parent, start_off + diff, start_off, in hfs_brec_update_parent()
416 hfs_bnode_copy(parent, fd->keyoffset, node, 14, newkeylen); in hfs_brec_update_parent()
418 hfs_bnode_write_u8(parent, fd->keyoffset, newkeylen - 1); in hfs_brec_update_parent()
419 hfs_bnode_dump(parent); in hfs_brec_update_parent()
422 node = parent; in hfs_brec_update_parent()
427 if (!new_node->parent) { in hfs_brec_update_parent()
429 new_node->parent = tree->root; in hfs_brec_update_parent()
431 fd->bnode = hfs_bnode_find(tree, new_node->parent); in hfs_brec_update_parent()
450 if (!rec && node->parent) in hfs_brec_update_parent()
485 new_node->parent = 0; in hfs_btree_inc_height()
503 node->parent = tree->root; in hfs_btree_inc_height()