Lines Matching refs:this

8  * For licensing information, see the file 'LICENCE' in this directory.
24 struct jffs2_node_frag *this);
102 struct jffs2_node_frag *this)
104 if (this->node) {
105 this->node->frags--;
106 if (!this->node->frags) {
109 ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size);
110 jffs2_mark_node_obsolete(c, this->node->raw);
111 jffs2_free_full_dnode(this->node);
114 ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size, this->node->frags);
115 mark_ref_normal(this->node->raw);
119 jffs2_free_node_frag(this);
171 struct jffs2_node_frag *this, uint32_t lastend)
183 if (this) {
184 /* By definition, the 'this' node has no right-hand child,
189 rb_link_node(&holefrag->rb, &this->rb, &this->rb.rb_right);
196 this = holefrag;
199 if (this) {
200 /* By definition, the 'this' node has no right-hand child,
204 rb_link_node(&newfrag->rb, &this->rb, &this->rb.rb_right);
217 struct jffs2_node_frag *this;
220 /* Skip all the nodes which are completed before this one starts */
221 this = jffs2_lookup_node_frag(root, newfrag->node->ofs);
223 if (this) {
225 this->ofs, this->ofs+this->size, this->node?(ref_offset(this->node->raw)):0xffffffff, this);
226 lastend = this->ofs + this->size;
236 /* Check if 'this' node was on the same page as the new node.
237 If so, both 'this' and the new node get marked REF_NORMAL so
241 if (this->node)
242 mark_ref_normal(this->node->raw);
246 return no_overlapping_node(c, root, newfrag, this, lastend);
249 if (this->node)
251 this->ofs, this->ofs + this->size,
252 ref_offset(this->node->raw), ref_flags(this->node->raw));
255 this->ofs, this->ofs + this->size);
257 /* OK. 'this' is pointing at the first frag that newfrag->ofs at least partially obsoletes,
258 * - i.e. newfrag->ofs < this->ofs+this->size && newfrag->ofs >= this->ofs
260 if (newfrag->ofs > this->ofs) {
266 if (this->node)
267 mark_ref_normal(this->node->raw);
269 if (this->ofs + this->size > newfrag->ofs + newfrag->size) {
270 /* The new node splits 'this' frag into two */
273 if (this->node)
275 this->ofs, this->ofs+this->size, ref_offset(this->node->raw));
278 this->ofs, this->ofs+this->size);
280 /* New second frag pointing to this's node */
281 newfrag2 = new_fragment(this->node, newfrag->ofs + newfrag->size,
282 this->ofs + this->size - newfrag->ofs - newfrag->size);
285 if (this->node)
286 this->node->frags++;
288 /* Adjust size of original 'this' */
289 this->size = newfrag->ofs - this->ofs;
292 greater than this->ofs but smaller than
295 'this' to insert newfrag, and a tree insert
297 jffs2_fragtree_insert(newfrag, this);
305 /* New node just reduces 'this' frag in size, doesn't split it */
306 this->size = newfrag->ofs - this->ofs;
309 jffs2_fragtree_insert(newfrag, this);
312 /* New frag starts at the same point as 'this' used to. Replace
314 dbg_fragtree2("inserting newfrag (*%p),%d-%d in before 'this' (*%p),%d-%d\n",
315 newfrag, newfrag->ofs, newfrag->ofs+newfrag->size, this, this->ofs, this->ofs+this->size);
317 rb_replace_node(&this->rb, &newfrag->rb, root);
319 if (newfrag->ofs + newfrag->size >= this->ofs+this->size) {
320 dbg_fragtree2("obsoleting node frag %p (%x-%x)\n", this, this->ofs, this->ofs+this->size);
321 jffs2_obsolete_node_frag(c, this);
323 this->ofs += newfrag->size;
324 this->size -= newfrag->size;
326 jffs2_fragtree_insert(this, newfrag);
327 rb_insert_color(&this->rb, root);
334 while ((this = frag_next(newfrag)) && newfrag->ofs + newfrag->size >= this->ofs + this->size) {
335 /* 'this' frag is obsoleted completely. */
337 this, this->ofs, this->ofs+this->size);
338 rb_erase(&this->rb, root);
339 jffs2_obsolete_node_frag(c, this);
344 if (!this || newfrag->ofs + newfrag->size == this->ofs)
348 this->size = (this->ofs + this->size) - (newfrag->ofs + newfrag->size);
349 this->ofs = newfrag->ofs + newfrag->size;
352 if (this->node)
353 mark_ref_normal(this->node->raw);
416 /* During mount, this needs no locking. During normal operation, its
490 struct jffs2_inode_cache *this, *next;
493 this = c->inocache_list[i];
494 while (this) {
495 next = this->next;
496 jffs2_xattr_free_inode(c, this);
497 jffs2_free_inode_cache(this);
498 this = next;
507 struct jffs2_raw_node_ref *this, *next;
510 this = c->blocks[i].first_node;
511 while (this) {
512 if (this[REFS_PER_BLOCK].flash_offset == REF_LINK_NODE)
513 next = this[REFS_PER_BLOCK].next_in_ino;
517 jffs2_free_refblock(this);
518 this = next;
573 of this node. Free the node */