Lines Matching refs:orphan
71 struct ubifs_orphan *orphan, *o; in ubifs_add_orphan() local
74 orphan = kzalloc(sizeof(struct ubifs_orphan), GFP_NOFS); in ubifs_add_orphan()
75 if (!orphan) in ubifs_add_orphan()
77 orphan->inum = inum; in ubifs_add_orphan()
78 orphan->new = 1; in ubifs_add_orphan()
83 kfree(orphan); in ubifs_add_orphan()
97 kfree(orphan); in ubifs_add_orphan()
103 rb_link_node(&orphan->rb, parent, p); in ubifs_add_orphan()
104 rb_insert_color(&orphan->rb, &c->orph_tree); in ubifs_add_orphan()
105 list_add_tail(&orphan->list, &c->orph_list); in ubifs_add_orphan()
106 list_add_tail(&orphan->new_list, &c->orph_new); in ubifs_add_orphan()
174 struct ubifs_orphan *orphan, **last; in ubifs_orphan_start_commit() local
178 list_for_each_entry(orphan, &c->orph_new, new_list) { in ubifs_orphan_start_commit()
179 ubifs_assert(orphan->new); in ubifs_orphan_start_commit()
180 orphan->new = 0; in ubifs_orphan_start_commit()
181 *last = orphan; in ubifs_orphan_start_commit()
182 last = &orphan->cnext; in ubifs_orphan_start_commit()
184 *last = orphan->cnext; in ubifs_orphan_start_commit()
278 struct ubifs_orphan *orphan, *cnext; in write_orph_node() local
307 orphan = cnext; in write_orph_node()
308 orph->inos[i] = cpu_to_le64(orphan->inum); in write_orph_node()
309 cnext = orphan->cnext; in write_orph_node()
310 orphan->cnext = NULL; in write_orph_node()
379 struct ubifs_orphan *orphan, **last; in consolidate() local
384 list_for_each_entry(orphan, &c->orph_list, list) { in consolidate()
385 if (orphan->new) in consolidate()
387 *last = orphan; in consolidate()
388 last = &orphan->cnext; in consolidate()
391 *last = orphan->cnext; in consolidate()
443 struct ubifs_orphan *orphan, *dnext; in erase_deleted() local
448 orphan = dnext; in erase_deleted()
449 dnext = orphan->dnext; in erase_deleted()
450 ubifs_assert(!orphan->new); in erase_deleted()
451 ubifs_assert(orphan->del); in erase_deleted()
452 rb_erase(&orphan->rb, &c->orph_tree); in erase_deleted()
453 list_del(&orphan->list); in erase_deleted()
455 dbg_gen("deleting orphan ino %lu", (unsigned long)orphan->inum); in erase_deleted()
456 kfree(orphan); in erase_deleted()
515 struct ubifs_orphan *orphan, *o; in insert_dead_orphan() local
518 orphan = kzalloc(sizeof(struct ubifs_orphan), GFP_KERNEL); in insert_dead_orphan()
519 if (!orphan) in insert_dead_orphan()
521 orphan->inum = inum; in insert_dead_orphan()
533 kfree(orphan); in insert_dead_orphan()
538 rb_link_node(&orphan->rb, parent, p); in insert_dead_orphan()
539 rb_insert_color(&orphan->rb, &c->orph_tree); in insert_dead_orphan()
540 list_add_tail(&orphan->list, &c->orph_list); in insert_dead_orphan()
541 orphan->del = 1; in insert_dead_orphan()
542 orphan->dnext = c->orph_dnext; in insert_dead_orphan()
543 c->orph_dnext = orphan; in insert_dead_orphan()
771 struct check_orphan *orphan, *o; in dbg_ins_check_orphan() local
774 orphan = kzalloc(sizeof(struct check_orphan), GFP_NOFS); in dbg_ins_check_orphan()
775 if (!orphan) in dbg_ins_check_orphan()
777 orphan->inum = inum; in dbg_ins_check_orphan()
788 kfree(orphan); in dbg_ins_check_orphan()
792 rb_link_node(&orphan->rb, parent, p); in dbg_ins_check_orphan()
793 rb_insert_color(&orphan->rb, root); in dbg_ins_check_orphan()