Lines Matching refs:zn
192 struct ubifs_znode *zn; in copy_znode() local
194 zn = kmemdup(znode, c->max_znode_sz, GFP_NOFS); in copy_znode()
195 if (unlikely(!zn)) in copy_znode()
198 zn->cnext = NULL; in copy_znode()
199 __set_bit(DIRTY_ZNODE, &zn->flags); in copy_znode()
200 __clear_bit(COW_ZNODE, &zn->flags); in copy_znode()
207 const int n = zn->child_cnt; in copy_znode()
211 struct ubifs_zbranch *zbr = &zn->zbranch[i]; in copy_znode()
214 zbr->znode->parent = zn; in copy_znode()
219 return zn; in copy_znode()
247 struct ubifs_znode *zn; in dirty_cow_znode() local
263 zn = copy_znode(c, znode); in dirty_cow_znode()
264 if (IS_ERR(zn)) in dirty_cow_znode()
265 return zn; in dirty_cow_znode()
275 zbr->znode = zn; in dirty_cow_znode()
282 return zn; in dirty_cow_znode()
602 static int tnc_next(struct ubifs_info *c, struct ubifs_znode **zn, int *n) in tnc_next() argument
604 struct ubifs_znode *znode = *zn; in tnc_next()
633 *zn = znode; in tnc_next()
647 static int tnc_prev(struct ubifs_info *c, struct ubifs_znode **zn, int *n) in tnc_prev() argument
649 struct ubifs_znode *znode = *zn; in tnc_prev()
678 *zn = znode; in tnc_prev()
700 struct ubifs_znode **zn, int *n, in resolve_collision() argument
705 err = matches_name(c, &(*zn)->zbranch[*n], nm); in resolve_collision()
714 err = tnc_prev(c, zn, n); in resolve_collision()
722 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) { in resolve_collision()
752 if (*n == (*zn)->child_cnt - 1) { in resolve_collision()
753 err = tnc_next(c, zn, n); in resolve_collision()
766 err = matches_name(c, &(*zn)->zbranch[*n], nm); in resolve_collision()
777 struct ubifs_znode *znode = *zn; in resolve_collision()
793 *zn = znode; in resolve_collision()
889 struct ubifs_znode **zn, int *n, in fallible_resolve_collision() argument
893 struct ubifs_znode *o_znode = NULL, *znode = *zn; in fallible_resolve_collision()
916 err = tnc_prev(c, zn, n); in fallible_resolve_collision()
924 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) { in fallible_resolve_collision()
926 if (*n == (*zn)->child_cnt - 1) { in fallible_resolve_collision()
927 err = tnc_next(c, zn, n); in fallible_resolve_collision()
940 err = fallible_matches_name(c, &(*zn)->zbranch[*n], nm); in fallible_resolve_collision()
946 o_znode = *zn; in fallible_resolve_collision()
961 *zn = znode; in fallible_resolve_collision()
976 *zn = znode; in fallible_resolve_collision()
994 *zn = o_znode; in fallible_resolve_collision()
1034 struct ubifs_znode **zn, int *n, in resolve_collision_directly() argument
1040 znode = *zn; in resolve_collision_directly()
1055 *zn = znode; in resolve_collision_directly()
1062 znode = *zn; in resolve_collision_directly()
1072 *zn = znode; in resolve_collision_directly()
1170 struct ubifs_znode **zn, int *n) in ubifs_lookup_level0() argument
1212 *zn = znode; in ubifs_lookup_level0()
1276 *zn = znode; in ubifs_lookup_level0()
1306 struct ubifs_znode **zn, int *n) in lookup_level0_dirty() argument
1356 *zn = znode; in lookup_level0_dirty()
1387 *zn = znode; in lookup_level0_dirty()
1884 struct ubifs_znode **zn, int *n, int exact) in search_dh_cookie() argument
1887 struct ubifs_znode *znode = *zn; in search_dh_cookie()
1912 *zn = znode; in search_dh_cookie()
2083 struct ubifs_znode *zn, *zi, *zp; in tnc_insert() local
2118 zn = kzalloc(c->max_znode_sz, GFP_NOFS); in tnc_insert()
2119 if (!zn) in tnc_insert()
2121 zn->parent = zp; in tnc_insert()
2122 zn->level = znode->level; in tnc_insert()
2174 zi = zn; in tnc_insert()
2177 if (zn->level != 0) in tnc_insert()
2178 zbr->znode->parent = zn; in tnc_insert()
2183 __set_bit(DIRTY_ZNODE, &zn->flags); in tnc_insert()
2186 zn->child_cnt = move; in tnc_insert()
2193 zn->zbranch[i] = znode->zbranch[keep + i]; in tnc_insert()
2195 if (zn->level != 0) in tnc_insert()
2196 if (zn->zbranch[i].znode) { in tnc_insert()
2197 zn->zbranch[i].znode->parent = zn; in tnc_insert()
2198 zn->zbranch[i].znode->iip = i; in tnc_insert()
2203 dbg_tnck(key, "inserting at %d level %d, key ", n, zn->level); in tnc_insert()
2216 zbr->key = zn->zbranch[0].key; in tnc_insert()
2217 zbr->znode = zn; in tnc_insert()
2244 zi->zbranch[1].key = zn->zbranch[0].key; in tnc_insert()
2245 zi->zbranch[1].znode = zn; in tnc_insert()
2252 zn->parent = zi; in tnc_insert()
2253 zn->iip = 1; in tnc_insert()
3181 struct ubifs_znode *znode, *zn; in lookup_znode() local
3241 zn = znode; in lookup_znode()
3265 znode = zn; in lookup_znode()
3337 struct ubifs_znode *znode, *zn; in is_leaf_node_in_tnc() local
3355 zn = znode; in is_leaf_node_in_tnc()
3371 znode = zn; in is_leaf_node_in_tnc()