Lines Matching refs:ri

146 		struct jffs2_raw_inode ri;  in jffs2_write_begin()  local
153 ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len, in jffs2_write_begin()
159 memset(&ri, 0, sizeof(ri)); in jffs2_write_begin()
161 ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); in jffs2_write_begin()
162 ri.nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE); in jffs2_write_begin()
163 ri.totlen = cpu_to_je32(sizeof(ri)); in jffs2_write_begin()
164 ri.hdr_crc = cpu_to_je32(crc32(0, &ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_write_begin()
166 ri.ino = cpu_to_je32(f->inocache->ino); in jffs2_write_begin()
167 ri.version = cpu_to_je32(++f->highest_version); in jffs2_write_begin()
168 ri.mode = cpu_to_jemode(inode->i_mode); in jffs2_write_begin()
169 ri.uid = cpu_to_je16(i_uid_read(inode)); in jffs2_write_begin()
170 ri.gid = cpu_to_je16(i_gid_read(inode)); in jffs2_write_begin()
171 ri.isize = cpu_to_je32((uint32_t)pos); in jffs2_write_begin()
172 ri.atime = ri.ctime = ri.mtime = cpu_to_je32(JFFS2_NOW()); in jffs2_write_begin()
173 ri.offset = cpu_to_je32(inode->i_size); in jffs2_write_begin()
174 ri.dsize = cpu_to_je32((uint32_t)pos - inode->i_size); in jffs2_write_begin()
175 ri.csize = cpu_to_je32(0); in jffs2_write_begin()
176 ri.compr = JFFS2_COMPR_ZERO; in jffs2_write_begin()
177 ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8)); in jffs2_write_begin()
178 ri.data_crc = cpu_to_je32(0); in jffs2_write_begin()
180 fn = jffs2_write_dnode(c, f, &ri, NULL, 0, ALLOC_NORMAL); in jffs2_write_begin()
254 struct jffs2_raw_inode *ri; in jffs2_write_end() local
279 ri = jffs2_alloc_raw_inode(); in jffs2_write_end()
281 if (!ri) { in jffs2_write_end()
290 ri->ino = cpu_to_je32(inode->i_ino); in jffs2_write_end()
291 ri->mode = cpu_to_jemode(inode->i_mode); in jffs2_write_end()
292 ri->uid = cpu_to_je16(i_uid_read(inode)); in jffs2_write_end()
293 ri->gid = cpu_to_je16(i_gid_read(inode)); in jffs2_write_end()
294 ri->isize = cpu_to_je32((uint32_t)inode->i_size); in jffs2_write_end()
295 ri->atime = ri->ctime = ri->mtime = cpu_to_je32(JFFS2_NOW()); in jffs2_write_end()
301 ret = jffs2_write_inode_range(c, f, ri, page_address(pg) + aligned_start, in jffs2_write_end()
321 ITIME(je32_to_cpu(ri->ctime))); in jffs2_write_end()
325 jffs2_free_raw_inode(ri); in jffs2_write_end()