Lines Matching defs:rii
219 struct jffs2_readinode_info *rii,
232 if (rii->mdata_tn) {
233 if (rii->mdata_tn->version < tn->version) {
235 dbg_readinode("kill old mdata with ver %d\n", rii->mdata_tn->version);
236 jffs2_kill_tn(c, rii->mdata_tn);
239 tn->version, rii->mdata_tn->version);
244 rii->mdata_tn = tn;
250 this = jffs2_lookup_tn(&rii->tn_root, tn->fn->ofs);
286 rb_replace_node(&this->rb, &tn->rb, &rii->tn_root);
305 tn_erase(this, &rii->tn_root);
327 tn_erase(this, &rii->tn_root);
339 struct rb_node **link = &rii->tn_root.rb_node;
354 rb_insert_color(&tn->rb, &rii->tn_root);
450 struct jffs2_readinode_info *rii)
456 if (rii->mdata_tn) {
457 dbg_readinode("potential mdata is ver %d at %p\n", rii->mdata_tn->version, rii->mdata_tn);
458 high_ver = rii->mdata_tn->version;
459 rii->latest_ref = rii->mdata_tn->fn->raw;
462 this = tn_last(&rii->tn_root);
469 pen = tn_last(&rii->tn_root);
473 eat_last(&rii->tn_root, &last->rb);
509 rii->latest_ref = this->fn->raw;
605 struct jffs2_readinode_info *rii)
655 if (fd->version > rii->highest_version)
656 rii->highest_version = fd->version;
659 if(fd->version > rii->mctime_ver && je32_to_cpu(rd->mctime)) {
660 rii->mctime_ver = fd->version;
661 rii->latest_mctime = je32_to_cpu(rd->mctime);
697 jffs2_add_fd_to_list(c, fd, &rii->fds);
711 struct jffs2_readinode_info *rii)
842 if (tn->version > rii->highest_version)
843 rii->highest_version = tn->version;
856 ret = jffs2_add_tn_to_tree(c, rii, tn);
866 tn = tn_first(&rii->tn_root);
978 struct jffs2_readinode_info *rii)
986 rii->mctime_ver = 0;
1082 err = read_direntry(c, ref, &node->d, retlen, rii);
1097 err = read_dnode(c, ref, &node->i, len, rii);
1123 f->highest_version = rii->highest_version;
1126 f->inocache->ino, rii->highest_version, rii->latest_mctime,
1127 rii->mctime_ver);
1131 jffs2_free_tmp_dnode_info_list(&rii->tn_root);
1132 jffs2_free_full_dirent_list(rii->fds);
1133 rii->fds = NULL;
1142 struct jffs2_readinode_info rii;
1150 memset(&rii, 0, sizeof(rii));
1153 ret = jffs2_get_inode_nodes(c, f, &rii);
1162 ret = jffs2_build_inode_fragtree(c, f, &rii);
1168 jffs2_free_tmp_dnode_info_list(&rii.tn_root);
1169 if (rii.mdata_tn) {
1170 jffs2_free_full_dnode(rii.mdata_tn->fn);
1171 jffs2_free_tmp_dnode_info(rii.mdata_tn);
1172 rii.mdata_tn = NULL;
1177 if (rii.mdata_tn) {
1178 if (rii.mdata_tn->fn->raw == rii.latest_ref) {
1179 f->metadata = rii.mdata_tn->fn;
1180 jffs2_free_tmp_dnode_info(rii.mdata_tn);
1182 jffs2_kill_tn(c, rii.mdata_tn);
1184 rii.mdata_tn = NULL;
1187 f->dents = rii.fds;
1191 if (unlikely(!rii.latest_ref)) {
1195 if (!rii.fds) {
1213 ret = jffs2_flash_read(c, ref_offset(rii.latest_ref), sizeof(*latest_node), &retlen, (void *)latest_node);
1225 f->inocache->ino, ref_offset(rii.latest_ref));
1233 if (rii.mctime_ver > je32_to_cpu(latest_node->version)) {
1236 latest_node->ctime = latest_node->mtime = cpu_to_je32(rii.latest_mctime);
1267 ret = jffs2_flash_read(c, ref_offset(rii.latest_ref) + sizeof(*latest_node),