Lines Matching refs:zn

203 	struct ubifs_znode *zn;
205 zn = kmalloc(c->max_znode_sz, GFP_NOFS);
206 if (unlikely(!zn))
209 memcpy(zn, znode, c->max_znode_sz);
210 zn->cnext = NULL;
211 __set_bit(DIRTY_ZNODE, &zn->flags);
212 __clear_bit(COW_ZNODE, &zn->flags);
219 const int n = zn->child_cnt;
223 struct ubifs_zbranch *zbr = &zn->zbranch[i];
226 zbr->znode->parent = zn;
231 return zn;
259 struct ubifs_znode *zn;
275 zn = copy_znode(c, znode);
276 if (IS_ERR(zn))
277 return zn;
287 zbr->znode = zn;
294 return zn;
604 * @zn: znode is passed and returned here
610 static int tnc_next(struct ubifs_info *c, struct ubifs_znode **zn, int *n)
612 struct ubifs_znode *znode = *zn;
641 *zn = znode;
649 * @zn: znode is returned here
655 static int tnc_prev(struct ubifs_info *c, struct ubifs_znode **zn, int *n)
657 struct ubifs_znode *znode = *zn;
686 *zn = znode;
695 * @zn: znode is returned here
701 * entry). It returns %1 and sets @zn and @n if the collision is resolved.
702 * %0 is returned if @nm is not found and @zn and @n are set to the previous
704 * This means that @n may be set to %-1 if the leftmost key in @zn is the
708 struct ubifs_znode **zn, int *n,
713 err = matches_name(c, &(*zn)->zbranch[*n], nm);
722 err = tnc_prev(c, zn, n);
730 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) {
760 if (*n == (*zn)->child_cnt - 1) {
761 err = tnc_next(c, zn, n);
774 err = matches_name(c, &(*zn)->zbranch[*n], nm);
785 struct ubifs_znode *znode = *zn;
801 *zn = znode;
877 * @zn: znode is returned here
888 * o if @nm was found, %1 is returned and @zn and @n are set to the found
892 * found, then %1 is returned and @zn and @n are set to the dangling branch;
897 struct ubifs_znode **zn, int *n,
900 struct ubifs_znode *o_znode = NULL, *znode = *zn;
923 err = tnc_prev(c, zn, n);
931 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) {
933 if (*n == (*zn)->child_cnt - 1) {
934 err = tnc_next(c, zn, n);
947 err = fallible_matches_name(c, &(*zn)->zbranch[*n], nm);
953 o_znode = *zn;
968 *zn = znode;
983 *zn = znode;
1001 *zn = o_znode;
1026 * @zn: znode is passed and returned here
1035 * names). This function returns %1 and sets @zn and @n if the collision is
1036 * resolved, %0 if @lnum:@offs is not found and @zn and @n are set to the
1041 struct ubifs_znode **zn, int *n,
1047 znode = *zn;
1062 *zn = znode;
1069 znode = *zn;
1079 *zn = znode;
1157 * @zn: znode is returned here
1161 * refers key @key. The found zero-level znode is returned in @zn. There are 3
1176 struct ubifs_znode **zn, int *n)
1218 *zn = znode;
1282 *zn = znode;
1290 * @zn: znode is returned here
1294 * refers key @key. The found zero-level znode is returned in @zn. There are 3
1312 struct ubifs_znode **zn, int *n)
1362 *zn = znode;
1393 *zn = znode;
1981 struct ubifs_znode *zn, *zi, *zp;
2016 zn = kzalloc(c->max_znode_sz, GFP_NOFS);
2017 if (!zn)
2019 zn->parent = zp;
2020 zn->level = znode->level;
2072 zi = zn;
2075 if (zn->level != 0)
2076 zbr->znode->parent = zn;
2081 __set_bit(DIRTY_ZNODE, &zn->flags);
2084 zn->child_cnt = move;
2091 zn->zbranch[i] = znode->zbranch[keep + i];
2093 if (zn->level != 0)
2094 if (zn->zbranch[i].znode) {
2095 zn->zbranch[i].znode->parent = zn;
2096 zn->zbranch[i].znode->iip = i;
2101 dbg_tnck(key, "inserting at %d level %d, key ", n, zn->level);
2114 zbr->key = zn->zbranch[0].key;
2115 zbr->znode = zn;
2142 zi->zbranch[1].key = zn->zbranch[0].key;
2143 zi->zbranch[1].znode = zn;
2150 zn->parent = zi;
2151 zn->iip = 1;
3000 struct ubifs_znode *znode, *zn;
3060 zn = znode;
3084 znode = zn;
3156 struct ubifs_znode *znode, *zn;
3174 zn = znode;
3190 znode = zn;