Lines Matching full:ri

139 		struct jffs2_raw_inode ri;  in jffs2_write_begin()  local
146 ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len, in jffs2_write_begin()
152 memset(&ri, 0, sizeof(ri)); in jffs2_write_begin()
154 ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); in jffs2_write_begin()
155 ri.nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE); in jffs2_write_begin()
156 ri.totlen = cpu_to_je32(sizeof(ri)); in jffs2_write_begin()
157 ri.hdr_crc = cpu_to_je32(crc32(0, &ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_write_begin()
159 ri.ino = cpu_to_je32(f->inocache->ino); in jffs2_write_begin()
160 ri.version = cpu_to_je32(++f->highest_version); in jffs2_write_begin()
161 ri.mode = cpu_to_jemode(inode->i_mode); in jffs2_write_begin()
162 ri.uid = cpu_to_je16(i_uid_read(inode)); in jffs2_write_begin()
163 ri.gid = cpu_to_je16(i_gid_read(inode)); in jffs2_write_begin()
164 ri.isize = cpu_to_je32((uint32_t)pos); in jffs2_write_begin()
165 ri.atime = ri.ctime = ri.mtime = cpu_to_je32(JFFS2_NOW()); in jffs2_write_begin()
166 ri.offset = cpu_to_je32(inode->i_size); in jffs2_write_begin()
167 ri.dsize = cpu_to_je32((uint32_t)pos - inode->i_size); in jffs2_write_begin()
168 ri.csize = cpu_to_je32(0); in jffs2_write_begin()
169 ri.compr = JFFS2_COMPR_ZERO; in jffs2_write_begin()
170 ri.node_crc = cpu_to_je32(crc32(0, &ri, sizeof(ri)-8)); in jffs2_write_begin()
171 ri.data_crc = cpu_to_je32(0); in jffs2_write_begin()
173 fn = jffs2_write_dnode(c, f, &ri, NULL, 0, ALLOC_NORMAL); in jffs2_write_begin()
248 struct jffs2_raw_inode *ri; in jffs2_write_end() local
274 ri = jffs2_alloc_raw_inode(); in jffs2_write_end()
276 if (!ri) { in jffs2_write_end()
285 ri->ino = cpu_to_je32(inode->i_ino); in jffs2_write_end()
286 ri->mode = cpu_to_jemode(inode->i_mode); in jffs2_write_end()
287 ri->uid = cpu_to_je16(i_uid_read(inode)); in jffs2_write_end()
288 ri->gid = cpu_to_je16(i_gid_read(inode)); in jffs2_write_end()
289 ri->isize = cpu_to_je32((uint32_t)inode->i_size); in jffs2_write_end()
290 ri->atime = ri->ctime = ri->mtime = cpu_to_je32(JFFS2_NOW()); in jffs2_write_end()
293 ret = jffs2_write_inode_range(c, f, ri, buf, in jffs2_write_end()
310 inode_set_ctime_to_ts(inode, ITIME(je32_to_cpu(ri->ctime)))); in jffs2_write_end()
314 jffs2_free_raw_inode(ri); in jffs2_write_end()