+ unsigned int tree_depth, i;
+ struct cds_ja_inode_flag *node_flag;
+
+ if (caa_unlikely(key > ja->key_max))
+ return NULL;
+ tree_depth = ja->tree_depth;
+ node_flag = ja->root;
+
+ for (i = 0; i < tree_depth; i++) {
+ node_flag = ja_node_get_nth(node_flag,
+ (unsigned char) key);
+ if (!ja_node_ptr(node_flag))
+ return NULL;
+ key >>= JA_BITS_PER_BYTE;
+ }
+
+ /* Last level lookup succeded. We got an actual node. */
+ return (struct cds_ja_node *) node_flag;