Lines Matching refs:rii

219 				struct jffs2_readinode_info *rii,  in jffs2_add_tn_to_tree()  argument
232 if (rii->mdata_tn) { in jffs2_add_tn_to_tree()
233 if (rii->mdata_tn->version < tn->version) { in jffs2_add_tn_to_tree()
235 dbg_readinode("kill old mdata with ver %d\n", rii->mdata_tn->version); in jffs2_add_tn_to_tree()
236 jffs2_kill_tn(c, rii->mdata_tn); in jffs2_add_tn_to_tree()
239 tn->version, rii->mdata_tn->version); in jffs2_add_tn_to_tree()
244 rii->mdata_tn = tn; in jffs2_add_tn_to_tree()
250 this = jffs2_lookup_tn(&rii->tn_root, tn->fn->ofs); in jffs2_add_tn_to_tree()
286 rb_replace_node(&this->rb, &tn->rb, &rii->tn_root); in jffs2_add_tn_to_tree()
305 tn_erase(this, &rii->tn_root); in jffs2_add_tn_to_tree()
327 tn_erase(this, &rii->tn_root); in jffs2_add_tn_to_tree()
339 struct rb_node **link = &rii->tn_root.rb_node; in jffs2_add_tn_to_tree()
354 rb_insert_color(&tn->rb, &rii->tn_root); in jffs2_add_tn_to_tree()
453 struct jffs2_readinode_info *rii) in jffs2_build_inode_fragtree() argument
459 if (rii->mdata_tn) { in jffs2_build_inode_fragtree()
460 dbg_readinode("potential mdata is ver %d at %p\n", rii->mdata_tn->version, rii->mdata_tn); in jffs2_build_inode_fragtree()
461 high_ver = rii->mdata_tn->version; in jffs2_build_inode_fragtree()
462 rii->latest_ref = rii->mdata_tn->fn->raw; in jffs2_build_inode_fragtree()
465 this = tn_last(&rii->tn_root); in jffs2_build_inode_fragtree()
472 pen = tn_last(&rii->tn_root); in jffs2_build_inode_fragtree()
476 eat_last(&rii->tn_root, &last->rb); in jffs2_build_inode_fragtree()
512 rii->latest_ref = this->fn->raw; in jffs2_build_inode_fragtree()
588 struct jffs2_readinode_info *rii) in read_direntry() argument
638 if (fd->version > rii->highest_version) in read_direntry()
639 rii->highest_version = fd->version; in read_direntry()
642 if(fd->version > rii->mctime_ver && je32_to_cpu(rd->mctime)) { in read_direntry()
643 rii->mctime_ver = fd->version; in read_direntry()
644 rii->latest_mctime = je32_to_cpu(rd->mctime); in read_direntry()
701 jffs2_add_fd_to_list(c, fd, &rii->fds); in read_direntry()
715 struct jffs2_readinode_info *rii) in read_dnode() argument
846 if (tn->version > rii->highest_version) in read_dnode()
847 rii->highest_version = tn->version; in read_dnode()
860 ret = jffs2_add_tn_to_tree(c, rii, tn); in read_dnode()
870 tn = tn_first(&rii->tn_root); in read_dnode()
982 struct jffs2_readinode_info *rii) in jffs2_get_inode_nodes() argument
990 rii->mctime_ver = 0; in jffs2_get_inode_nodes()
1089 err = read_direntry(c, ref, &node->d, retlen, rii); in jffs2_get_inode_nodes()
1104 err = read_dnode(c, ref, &node->i, len, rii); in jffs2_get_inode_nodes()
1130 f->highest_version = rii->highest_version; in jffs2_get_inode_nodes()
1133 f->inocache->ino, rii->highest_version, rii->latest_mctime, in jffs2_get_inode_nodes()
1134 rii->mctime_ver); in jffs2_get_inode_nodes()
1138 jffs2_free_tmp_dnode_info_list(&rii->tn_root); in jffs2_get_inode_nodes()
1139 jffs2_free_full_dirent_list(rii->fds); in jffs2_get_inode_nodes()
1140 rii->fds = NULL; in jffs2_get_inode_nodes()
1149 struct jffs2_readinode_info rii; in jffs2_do_read_inode_internal() local
1157 memset(&rii, 0, sizeof(rii)); in jffs2_do_read_inode_internal()
1160 ret = jffs2_get_inode_nodes(c, f, &rii); in jffs2_do_read_inode_internal()
1169 ret = jffs2_build_inode_fragtree(c, f, &rii); in jffs2_do_read_inode_internal()
1175 jffs2_free_tmp_dnode_info_list(&rii.tn_root); in jffs2_do_read_inode_internal()
1177 if (rii.mdata_tn) { in jffs2_do_read_inode_internal()
1178 jffs2_free_full_dnode(rii.mdata_tn->fn); in jffs2_do_read_inode_internal()
1179 jffs2_free_tmp_dnode_info(rii.mdata_tn); in jffs2_do_read_inode_internal()
1180 rii.mdata_tn = NULL; in jffs2_do_read_inode_internal()
1185 if (rii.mdata_tn) { in jffs2_do_read_inode_internal()
1186 if (rii.mdata_tn->fn->raw == rii.latest_ref) { in jffs2_do_read_inode_internal()
1187 f->metadata = rii.mdata_tn->fn; in jffs2_do_read_inode_internal()
1188 jffs2_free_tmp_dnode_info(rii.mdata_tn); in jffs2_do_read_inode_internal()
1190 jffs2_kill_tn(c, rii.mdata_tn); in jffs2_do_read_inode_internal()
1192 rii.mdata_tn = NULL; in jffs2_do_read_inode_internal()
1195 f->dents = rii.fds; in jffs2_do_read_inode_internal()
1199 if (unlikely(!rii.latest_ref)) { in jffs2_do_read_inode_internal()
1203 if (!rii.fds) { in jffs2_do_read_inode_internal()
1221 …ret = jffs2_flash_read(c, ref_offset(rii.latest_ref), sizeof(*latest_node), &retlen, (void *)lates… in jffs2_do_read_inode_internal()
1232 f->inocache->ino, ref_offset(rii.latest_ref)); in jffs2_do_read_inode_internal()
1238 if (rii.mctime_ver > je32_to_cpu(latest_node->version)) { in jffs2_do_read_inode_internal()
1241 latest_node->ctime = latest_node->mtime = cpu_to_je32(rii.latest_mctime); in jffs2_do_read_inode_internal()
1277 ret = jffs2_flash_read(c, ref_offset(rii.latest_ref) + sizeof(*latest_node), in jffs2_do_read_inode_internal()