Lines Matching defs:old_idx
48 struct ubifs_old_idx *old_idx)
53 p = &c->old_idx.rb_node;
57 if (old_idx->lnum < o->lnum)
59 else if (old_idx->lnum > o->lnum)
61 else if (old_idx->offs < o->offs)
63 else if (old_idx->offs > o->offs)
67 kfree(old_idx);
71 rb_link_node(&old_idx->rb, parent, p);
72 rb_insert_color(&old_idx->rb, &c->old_idx);
100 struct ubifs_old_idx *old_idx;
102 old_idx = kmalloc(sizeof(struct ubifs_old_idx), GFP_NOFS);
103 if (unlikely(!old_idx))
105 old_idx->lnum = lnum;
106 old_idx->offs = offs;
107 do_insert_old_idx(c, old_idx);
171 * destroy_old_idx - destroy the old_idx RB-tree.
174 * During start commit, the old_idx RB-tree is used to avoid overwriting index
182 struct ubifs_old_idx *old_idx, *n;
184 rbtree_postorder_for_each_entry_safe(old_idx, n, &c->old_idx, rb)
185 kfree(old_idx);
187 c->old_idx = RB_ROOT;
295 struct ubifs_old_idx *old_idx;
297 old_idx = kmalloc(sizeof(struct ubifs_old_idx), GFP_NOFS);
298 if (unlikely(!old_idx)) {
302 old_idx->lnum = zbr->lnum;
303 old_idx->offs = zbr->offs;
307 kfree(old_idx);
311 do_insert_old_idx(c, old_idx);
2100 * if they are split we add their lnum/offs to the old_idx tree.
2152 * record it in the old_idx tree.