Lines Matching refs:orphan

56 	struct ubifs_orphan *orphan, *o;  in ubifs_add_orphan()  local
59 orphan = kzalloc(sizeof(struct ubifs_orphan), GFP_NOFS); in ubifs_add_orphan()
60 if (!orphan) in ubifs_add_orphan()
62 orphan->inum = inum; in ubifs_add_orphan()
63 orphan->new = 1; in ubifs_add_orphan()
68 kfree(orphan); in ubifs_add_orphan()
82 kfree(orphan); in ubifs_add_orphan()
88 rb_link_node(&orphan->rb, parent, p); in ubifs_add_orphan()
89 rb_insert_color(&orphan->rb, &c->orph_tree); in ubifs_add_orphan()
90 list_add_tail(&orphan->list, &c->orph_list); in ubifs_add_orphan()
91 list_add_tail(&orphan->new_list, &c->orph_new); in ubifs_add_orphan()
159 struct ubifs_orphan *orphan, **last; in ubifs_orphan_start_commit() local
163 list_for_each_entry(orphan, &c->orph_new, new_list) { in ubifs_orphan_start_commit()
164 ubifs_assert(orphan->new); in ubifs_orphan_start_commit()
165 ubifs_assert(!orphan->cmt); in ubifs_orphan_start_commit()
166 orphan->new = 0; in ubifs_orphan_start_commit()
167 orphan->cmt = 1; in ubifs_orphan_start_commit()
168 *last = orphan; in ubifs_orphan_start_commit()
169 last = &orphan->cnext; in ubifs_orphan_start_commit()
264 struct ubifs_orphan *orphan, *cnext; in write_orph_node() local
293 orphan = cnext; in write_orph_node()
294 ubifs_assert(orphan->cmt); in write_orph_node()
295 orph->inos[i] = cpu_to_le64(orphan->inum); in write_orph_node()
296 orphan->cmt = 0; in write_orph_node()
297 cnext = orphan->cnext; in write_orph_node()
298 orphan->cnext = NULL; in write_orph_node()
366 struct ubifs_orphan *orphan, **last; in consolidate() local
371 list_for_each_entry(orphan, &c->orph_list, list) { in consolidate()
372 if (orphan->new) in consolidate()
374 orphan->cmt = 1; in consolidate()
375 *last = orphan; in consolidate()
376 last = &orphan->cnext; in consolidate()
431 struct ubifs_orphan *orphan, *dnext; in erase_deleted() local
436 orphan = dnext; in erase_deleted()
437 dnext = orphan->dnext; in erase_deleted()
438 ubifs_assert(!orphan->new); in erase_deleted()
439 ubifs_assert(orphan->del); in erase_deleted()
440 rb_erase(&orphan->rb, &c->orph_tree); in erase_deleted()
441 list_del(&orphan->list); in erase_deleted()
443 dbg_gen("deleting orphan ino %lu", (unsigned long)orphan->inum); in erase_deleted()
444 kfree(orphan); in erase_deleted()
503 struct ubifs_orphan *orphan, *o; in insert_dead_orphan() local
506 orphan = kzalloc(sizeof(struct ubifs_orphan), GFP_KERNEL); in insert_dead_orphan()
507 if (!orphan) in insert_dead_orphan()
509 orphan->inum = inum; in insert_dead_orphan()
521 kfree(orphan); in insert_dead_orphan()
526 rb_link_node(&orphan->rb, parent, p); in insert_dead_orphan()
527 rb_insert_color(&orphan->rb, &c->orph_tree); in insert_dead_orphan()
528 list_add_tail(&orphan->list, &c->orph_list); in insert_dead_orphan()
529 orphan->del = 1; in insert_dead_orphan()
530 orphan->dnext = c->orph_dnext; in insert_dead_orphan()
531 c->orph_dnext = orphan; in insert_dead_orphan()
760 struct check_orphan *orphan, *o; in dbg_ins_check_orphan() local
763 orphan = kzalloc(sizeof(struct check_orphan), GFP_NOFS); in dbg_ins_check_orphan()
764 if (!orphan) in dbg_ins_check_orphan()
766 orphan->inum = inum; in dbg_ins_check_orphan()
777 kfree(orphan); in dbg_ins_check_orphan()
781 rb_link_node(&orphan->rb, parent, p); in dbg_ins_check_orphan()
782 rb_insert_color(&orphan->rb, root); in dbg_ins_check_orphan()