Lines Matching defs:cnode

24  * first_dirty_cnode - find first dirty cnode.
28 * This function returns the first dirty cnode or %NULL if there is not one.
37 struct ubifs_cnode *cnode;
39 cnode = nnode->nbranch[i].cnode;
40 if (cnode &&
41 test_bit(DIRTY_CNODE, &cnode->flags)) {
42 if (cnode->level == 0)
43 return cnode;
44 nnode = (struct ubifs_nnode *)cnode;
55 * next_dirty_cnode - find next dirty cnode.
57 * @cnode: cnode from which to begin searching
59 * This function returns the next dirty cnode or %NULL if there is not one.
61 static struct ubifs_cnode *next_dirty_cnode(const struct ubifs_info *c, struct ubifs_cnode *cnode)
66 ubifs_assert(c, cnode);
67 nnode = cnode->parent;
70 for (i = cnode->iip + 1; i < UBIFS_LPT_FANOUT; i++) {
71 cnode = nnode->nbranch[i].cnode;
72 if (cnode && test_bit(DIRTY_CNODE, &cnode->flags)) {
73 if (cnode->level == 0)
74 return cnode; /* cnode is a pnode */
75 /* cnode is a nnode */
76 return first_dirty_cnode(c, (struct ubifs_nnode *)cnode);
90 struct ubifs_cnode *cnode, *cnext;
100 cnode = c->lpt_cnext;
101 if (!cnode)
105 ubifs_assert(c, !test_bit(COW_CNODE, &cnode->flags));
106 __set_bit(COW_CNODE, &cnode->flags);
107 cnext = next_dirty_cnode(c, cnode);
109 cnode->cnext = c->lpt_cnext;
112 cnode->cnext = cnext;
113 cnode = cnext;
185 struct ubifs_cnode *cnode;
190 cnode = c->lpt_cnext;
191 if (!cnode)
215 if (cnode->level) {
251 if (cnode->parent) {
252 cnode->parent->nbranch[cnode->iip].lnum = lnum;
253 cnode->parent->nbranch[cnode->iip].offs = offs;
260 cnode = cnode->cnext;
261 } while (cnode && cnode != c->lpt_cnext);
363 struct ubifs_cnode *cnode;
366 cnode = c->lpt_cnext;
367 if (!cnode)
395 /* Loop for each cnode */
397 if (cnode->level)
438 if (cnode->level)
440 (struct ubifs_nnode *)cnode);
443 (struct ubifs_pnode *)cnode);
450 clear_bit(DIRTY_CNODE, &cnode->flags);
452 clear_bit(COW_CNODE, &cnode->flags);
456 cnode = cnode->cnext;
457 } while (cnode && cnode != c->lpt_cnext);
1258 struct ubifs_cnode *cnode, *cnext;
1264 cnode = cnext;
1265 cnext = cnode->cnext;
1266 if (test_bit(OBSOLETE_CNODE, &cnode->flags))
1267 kfree(cnode);
1269 cnode->cnext = NULL;