Lines Matching refs:zn

200 	struct ubifs_znode *zn;
202 zn = kmemdup(znode, c->max_znode_sz, GFP_NOFS);
203 if (unlikely(!zn))
206 zn->cnext = NULL;
207 __set_bit(DIRTY_ZNODE, &zn->flags);
208 __clear_bit(COW_ZNODE, &zn->flags);
210 return zn;
274 struct ubifs_znode *zn;
290 zn = copy_znode(c, znode);
291 if (IS_ERR(zn))
292 return zn;
314 replace_znode(c, zn, znode, zbr);
316 return zn;
319 kfree(zn);
634 * @zn: znode is passed and returned here
640 static int tnc_next(struct ubifs_info *c, struct ubifs_znode **zn, int *n)
642 struct ubifs_znode *znode = *zn;
671 *zn = znode;
679 * @zn: znode is returned here
685 static int tnc_prev(struct ubifs_info *c, struct ubifs_znode **zn, int *n)
687 struct ubifs_znode *znode = *zn;
716 *zn = znode;
725 * @zn: znode is returned here
731 * entry). It returns %1 and sets @zn and @n if the collision is resolved.
732 * %0 is returned if @nm is not found and @zn and @n are set to the previous
734 * This means that @n may be set to %-1 if the leftmost key in @zn is the
738 struct ubifs_znode **zn, int *n,
743 err = matches_name(c, &(*zn)->zbranch[*n], nm);
752 err = tnc_prev(c, zn, n);
760 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) {
790 if (*n == (*zn)->child_cnt - 1) {
791 err = tnc_next(c, zn, n);
804 err = matches_name(c, &(*zn)->zbranch[*n], nm);
815 struct ubifs_znode *znode = *zn;
831 *zn = znode;
907 * @zn: znode is returned here
918 * o if @nm was found, %1 is returned and @zn and @n are set to the found
922 * found, then %1 is returned and @zn and @n are set to the dangling branch;
927 struct ubifs_znode **zn, int *n,
931 struct ubifs_znode *o_znode = NULL, *znode = *zn;
954 err = tnc_prev(c, zn, n);
962 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) {
964 if (*n == (*zn)->child_cnt - 1) {
965 err = tnc_next(c, zn, n);
978 err = fallible_matches_name(c, &(*zn)->zbranch[*n], nm);
984 o_znode = *zn;
999 *zn = znode;
1014 *zn = znode;
1032 *zn = o_znode;
1057 * @zn: znode is passed and returned here
1066 * names). This function returns %1 and sets @zn and @n if the collision is
1067 * resolved, %0 if @lnum:@offs is not found and @zn and @n are set to the
1072 struct ubifs_znode **zn, int *n,
1078 znode = *zn;
1093 *zn = znode;
1100 znode = *zn;
1110 *zn = znode;
1189 * @zn: znode is returned here
1193 * refers key @key. The found zero-level znode is returned in @zn. There are 3
1208 struct ubifs_znode **zn, int *n)
1250 *zn = znode;
1314 *zn = znode;
1322 * @zn: znode is returned here
1326 * refers key @key. The found zero-level znode is returned in @zn. There are 3
1344 struct ubifs_znode **zn, int *n)
1394 *zn = znode;
1425 *zn = znode;
1922 struct ubifs_znode **zn, int *n, int exact)
1925 struct ubifs_znode *znode = *zn;
1950 *zn = znode;
2121 struct ubifs_znode *zn, *zi, *zp;
2156 zn = kzalloc(c->max_znode_sz, GFP_NOFS);
2157 if (!zn)
2159 zn->parent = zp;
2160 zn->level = znode->level;
2212 zi = zn;
2215 if (zn->level != 0)
2216 zbr->znode->parent = zn;
2221 __set_bit(DIRTY_ZNODE, &zn->flags);
2224 zn->child_cnt = move;
2231 zn->zbranch[i] = znode->zbranch[keep + i];
2233 if (zn->level != 0)
2234 if (zn->zbranch[i].znode) {
2235 zn->zbranch[i].znode->parent = zn;
2236 zn->zbranch[i].znode->iip = i;
2241 dbg_tnck(key, "inserting at %d level %d, key ", n, zn->level);
2254 zbr->key = zn->zbranch[0].key;
2255 zbr->znode = zn;
2282 zi->zbranch[1].key = zn->zbranch[0].key;
2283 zi->zbranch[1].znode = zn;
2290 zn->parent = zi;
2291 zn->iip = 1;
3234 struct ubifs_znode *znode, *zn;
3294 zn = znode;
3318 znode = zn;
3390 struct ubifs_znode *znode, *zn;
3408 zn = znode;
3424 znode = zn;