Lines Matching refs:zn
193 struct ubifs_znode *zn; in copy_znode() local
195 zn = kmalloc(c->max_znode_sz, GFP_NOFS); in copy_znode()
196 if (unlikely(!zn)) in copy_znode()
199 memcpy(zn, znode, c->max_znode_sz); in copy_znode()
200 zn->cnext = NULL; in copy_znode()
201 __set_bit(DIRTY_ZNODE, &zn->flags); in copy_znode()
202 __clear_bit(COW_ZNODE, &zn->flags); in copy_znode()
209 const int n = zn->child_cnt; in copy_znode()
213 struct ubifs_zbranch *zbr = &zn->zbranch[i]; in copy_znode()
216 zbr->znode->parent = zn; in copy_znode()
221 return zn; in copy_znode()
249 struct ubifs_znode *zn; in dirty_cow_znode() local
265 zn = copy_znode(c, znode); in dirty_cow_znode()
266 if (IS_ERR(zn)) in dirty_cow_znode()
267 return zn; in dirty_cow_znode()
277 zbr->znode = zn; in dirty_cow_znode()
284 return zn; in dirty_cow_znode()
588 static int tnc_next(struct ubifs_info *c, struct ubifs_znode **zn, int *n) in tnc_next() argument
590 struct ubifs_znode *znode = *zn; in tnc_next()
619 *zn = znode; in tnc_next()
633 static int tnc_prev(struct ubifs_info *c, struct ubifs_znode **zn, int *n) in tnc_prev() argument
635 struct ubifs_znode *znode = *zn; in tnc_prev()
664 *zn = znode; in tnc_prev()
686 struct ubifs_znode **zn, int *n, in resolve_collision() argument
691 err = matches_name(c, &(*zn)->zbranch[*n], nm); in resolve_collision()
700 err = tnc_prev(c, zn, n); in resolve_collision()
708 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) { in resolve_collision()
738 if (*n == (*zn)->child_cnt - 1) { in resolve_collision()
739 err = tnc_next(c, zn, n); in resolve_collision()
752 err = matches_name(c, &(*zn)->zbranch[*n], nm); in resolve_collision()
763 struct ubifs_znode *znode = *zn; in resolve_collision()
779 *zn = znode; in resolve_collision()
875 struct ubifs_znode **zn, int *n, in fallible_resolve_collision() argument
878 struct ubifs_znode *o_znode = NULL, *znode = *zn; in fallible_resolve_collision()
901 err = tnc_prev(c, zn, n); in fallible_resolve_collision()
909 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) { in fallible_resolve_collision()
911 if (*n == (*zn)->child_cnt - 1) { in fallible_resolve_collision()
912 err = tnc_next(c, zn, n); in fallible_resolve_collision()
925 err = fallible_matches_name(c, &(*zn)->zbranch[*n], nm); in fallible_resolve_collision()
931 o_znode = *zn; in fallible_resolve_collision()
946 *zn = znode; in fallible_resolve_collision()
961 *zn = znode; in fallible_resolve_collision()
979 *zn = o_znode; in fallible_resolve_collision()
1019 struct ubifs_znode **zn, int *n, in resolve_collision_directly() argument
1025 znode = *zn; in resolve_collision_directly()
1040 *zn = znode; in resolve_collision_directly()
1047 znode = *zn; in resolve_collision_directly()
1057 *zn = znode; in resolve_collision_directly()
1154 struct ubifs_znode **zn, int *n) in ubifs_lookup_level0() argument
1196 *zn = znode; in ubifs_lookup_level0()
1260 *zn = znode; in ubifs_lookup_level0()
1290 struct ubifs_znode **zn, int *n) in lookup_level0_dirty() argument
1340 *zn = znode; in lookup_level0_dirty()
1371 *zn = znode; in lookup_level0_dirty()
1959 struct ubifs_znode *zn, *zi, *zp; in tnc_insert() local
1994 zn = kzalloc(c->max_znode_sz, GFP_NOFS); in tnc_insert()
1995 if (!zn) in tnc_insert()
1997 zn->parent = zp; in tnc_insert()
1998 zn->level = znode->level; in tnc_insert()
2050 zi = zn; in tnc_insert()
2053 if (zn->level != 0) in tnc_insert()
2054 zbr->znode->parent = zn; in tnc_insert()
2059 __set_bit(DIRTY_ZNODE, &zn->flags); in tnc_insert()
2062 zn->child_cnt = move; in tnc_insert()
2069 zn->zbranch[i] = znode->zbranch[keep + i]; in tnc_insert()
2071 if (zn->level != 0) in tnc_insert()
2072 if (zn->zbranch[i].znode) { in tnc_insert()
2073 zn->zbranch[i].znode->parent = zn; in tnc_insert()
2074 zn->zbranch[i].znode->iip = i; in tnc_insert()
2079 dbg_tnck(key, "inserting at %d level %d, key ", n, zn->level); in tnc_insert()
2092 zbr->key = zn->zbranch[0].key; in tnc_insert()
2093 zbr->znode = zn; in tnc_insert()
2120 zi->zbranch[1].key = zn->zbranch[0].key; in tnc_insert()
2121 zi->zbranch[1].znode = zn; in tnc_insert()
2128 zn->parent = zi; in tnc_insert()
2129 zn->iip = 1; in tnc_insert()
2974 struct ubifs_znode *znode, *zn; in lookup_znode() local
3034 zn = znode; in lookup_znode()
3058 znode = zn; in lookup_znode()
3130 struct ubifs_znode *znode, *zn; in is_leaf_node_in_tnc() local
3148 zn = znode; in is_leaf_node_in_tnc()
3164 znode = zn; in is_leaf_node_in_tnc()