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);
70 rb_link_node(&old_idx->rb, parent, p);
71 rb_insert_color(&old_idx->rb, &c->old_idx);
99 struct ubifs_old_idx *old_idx;
101 old_idx = kmalloc(sizeof(struct ubifs_old_idx), GFP_NOFS);
102 if (unlikely(!old_idx))
104 old_idx->lnum = lnum;
105 old_idx->offs = offs;
106 do_insert_old_idx(c, old_idx);
170 * destroy_old_idx - destroy the old_idx RB-tree.
173 * During start commit, the old_idx RB-tree is used to avoid overwriting index
181 struct ubifs_old_idx *old_idx, *n;
183 rbtree_postorder_for_each_entry_safe(old_idx, n, &c->old_idx, rb)
184 kfree(old_idx);
186 c->old_idx = RB_ROOT;
294 struct ubifs_old_idx *old_idx;
296 old_idx = kmalloc(sizeof(struct ubifs_old_idx), GFP_NOFS);
297 if (unlikely(!old_idx)) {
301 old_idx->lnum = zbr->lnum;
302 old_idx->offs = zbr->offs;
306 kfree(old_idx);
310 do_insert_old_idx(c, old_idx);
2099 * if they are split we add their lnum/offs to the old_idx tree.
2151 * record it in the old_idx tree.