Lines Matching refs:zn

199 	struct ubifs_znode *zn;
201 zn = kmemdup(znode, c->max_znode_sz, GFP_NOFS);
202 if (unlikely(!zn))
205 zn->cnext = NULL;
206 __set_bit(DIRTY_ZNODE, &zn->flags);
207 __clear_bit(COW_ZNODE, &zn->flags);
209 return zn;
273 struct ubifs_znode *zn;
289 zn = copy_znode(c, znode);
290 if (IS_ERR(zn))
291 return zn;
313 replace_znode(c, zn, znode, zbr);
315 return zn;
318 kfree(zn);
633 * @zn: znode is passed and returned here
639 static int tnc_next(struct ubifs_info *c, struct ubifs_znode **zn, int *n)
641 struct ubifs_znode *znode = *zn;
670 *zn = znode;
678 * @zn: znode is returned here
684 static int tnc_prev(struct ubifs_info *c, struct ubifs_znode **zn, int *n)
686 struct ubifs_znode *znode = *zn;
715 *zn = znode;
724 * @zn: znode is returned here
730 * entry). It returns %1 and sets @zn and @n if the collision is resolved.
731 * %0 is returned if @nm is not found and @zn and @n are set to the previous
733 * This means that @n may be set to %-1 if the leftmost key in @zn is the
737 struct ubifs_znode **zn, int *n,
742 err = matches_name(c, &(*zn)->zbranch[*n], nm);
751 err = tnc_prev(c, zn, n);
759 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) {
789 if (*n == (*zn)->child_cnt - 1) {
790 err = tnc_next(c, zn, n);
803 err = matches_name(c, &(*zn)->zbranch[*n], nm);
814 struct ubifs_znode *znode = *zn;
830 *zn = znode;
906 * @zn: znode is returned here
917 * o if @nm was found, %1 is returned and @zn and @n are set to the found
921 * found, then %1 is returned and @zn and @n are set to the dangling branch;
926 struct ubifs_znode **zn, int *n,
930 struct ubifs_znode *o_znode = NULL, *znode = *zn;
953 err = tnc_prev(c, zn, n);
961 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) {
963 if (*n == (*zn)->child_cnt - 1) {
964 err = tnc_next(c, zn, n);
977 err = fallible_matches_name(c, &(*zn)->zbranch[*n], nm);
983 o_znode = *zn;
998 *zn = znode;
1013 *zn = znode;
1031 *zn = o_znode;
1056 * @zn: znode is passed and returned here
1065 * names). This function returns %1 and sets @zn and @n if the collision is
1066 * resolved, %0 if @lnum:@offs is not found and @zn and @n are set to the
1071 struct ubifs_znode **zn, int *n,
1077 znode = *zn;
1092 *zn = znode;
1099 znode = *zn;
1109 *zn = znode;
1188 * @zn: znode is returned here
1192 * refers key @key. The found zero-level znode is returned in @zn. There are 3
1207 struct ubifs_znode **zn, int *n)
1249 *zn = znode;
1313 *zn = znode;
1321 * @zn: znode is returned here
1325 * refers key @key. The found zero-level znode is returned in @zn. There are 3
1343 struct ubifs_znode **zn, int *n)
1393 *zn = znode;
1424 *zn = znode;
1921 struct ubifs_znode **zn, int *n, int exact)
1924 struct ubifs_znode *znode = *zn;
1949 *zn = znode;
2120 struct ubifs_znode *zn, *zi, *zp;
2155 zn = kzalloc(c->max_znode_sz, GFP_NOFS);
2156 if (!zn)
2158 zn->parent = zp;
2159 zn->level = znode->level;
2211 zi = zn;
2214 if (zn->level != 0)
2215 zbr->znode->parent = zn;
2220 __set_bit(DIRTY_ZNODE, &zn->flags);
2223 zn->child_cnt = move;
2230 zn->zbranch[i] = znode->zbranch[keep + i];
2232 if (zn->level != 0)
2233 if (zn->zbranch[i].znode) {
2234 zn->zbranch[i].znode->parent = zn;
2235 zn->zbranch[i].znode->iip = i;
2240 dbg_tnck(key, "inserting at %d level %d, key ", n, zn->level);
2253 zbr->key = zn->zbranch[0].key;
2254 zbr->znode = zn;
2281 zi->zbranch[1].key = zn->zbranch[0].key;
2282 zi->zbranch[1].znode = zn;
2289 zn->parent = zi;
2290 zn->iip = 1;
3233 struct ubifs_znode *znode, *zn;
3293 zn = znode;
3317 znode = zn;
3389 struct ubifs_znode *znode, *zn;
3407 zn = znode;
3423 znode = zn;