Lines Matching refs:ri
166 struct jffs2_raw_inode *ri; in jffs2_create() local
172 ri = jffs2_alloc_raw_inode(); in jffs2_create()
173 if (!ri) in jffs2_create()
180 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_create()
184 jffs2_free_raw_inode(ri); in jffs2_create()
203 ret = jffs2_do_create(c, dir_f, f, ri, &dentry->d_name); in jffs2_create()
207 dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(ri->ctime)); in jffs2_create()
209 jffs2_free_raw_inode(ri); in jffs2_create()
220 jffs2_free_raw_inode(ri); in jffs2_create()
288 struct jffs2_raw_inode *ri; in jffs2_symlink() local
301 ri = jffs2_alloc_raw_inode(); in jffs2_symlink()
303 if (!ri) in jffs2_symlink()
312 ret = jffs2_reserve_space(c, sizeof(*ri) + targetlen, &alloclen, in jffs2_symlink()
316 jffs2_free_raw_inode(ri); in jffs2_symlink()
320 inode = jffs2_new_inode(dir_i, S_IFLNK | S_IRWXUGO, ri); in jffs2_symlink()
323 jffs2_free_raw_inode(ri); in jffs2_symlink()
333 ri->isize = ri->dsize = ri->csize = cpu_to_je32(inode->i_size); in jffs2_symlink()
334 ri->totlen = cpu_to_je32(sizeof(*ri) + inode->i_size); in jffs2_symlink()
335 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_symlink()
337 ri->compr = JFFS2_COMPR_NONE; in jffs2_symlink()
338 ri->data_crc = cpu_to_je32(crc32(0, target, targetlen)); in jffs2_symlink()
339 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_symlink()
341 fn = jffs2_write_dnode(c, f, ri, target, targetlen, ALLOC_NORMAL); in jffs2_symlink()
343 jffs2_free_raw_inode(ri); in jffs2_symlink()
451 struct jffs2_raw_inode *ri; in jffs2_mkdir() local
461 ri = jffs2_alloc_raw_inode(); in jffs2_mkdir()
462 if (!ri) in jffs2_mkdir()
471 ret = jffs2_reserve_space(c, sizeof(*ri), &alloclen, ALLOC_NORMAL, in jffs2_mkdir()
475 jffs2_free_raw_inode(ri); in jffs2_mkdir()
479 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_mkdir()
482 jffs2_free_raw_inode(ri); in jffs2_mkdir()
497 ri->data_crc = cpu_to_je32(0); in jffs2_mkdir()
498 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_mkdir()
500 fn = jffs2_write_dnode(c, f, ri, NULL, 0, ALLOC_NORMAL); in jffs2_mkdir()
502 jffs2_free_raw_inode(ri); in jffs2_mkdir()
623 struct jffs2_raw_inode *ri; in jffs2_mknod() local
633 ri = jffs2_alloc_raw_inode(); in jffs2_mknod()
634 if (!ri) in jffs2_mknod()
646 ret = jffs2_reserve_space(c, sizeof(*ri) + devlen, &alloclen, in jffs2_mknod()
650 jffs2_free_raw_inode(ri); in jffs2_mknod()
654 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_mknod()
657 jffs2_free_raw_inode(ri); in jffs2_mknod()
666 ri->dsize = ri->csize = cpu_to_je32(devlen); in jffs2_mknod()
667 ri->totlen = cpu_to_je32(sizeof(*ri) + devlen); in jffs2_mknod()
668 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_mknod()
670 ri->compr = JFFS2_COMPR_NONE; in jffs2_mknod()
671 ri->data_crc = cpu_to_je32(crc32(0, &dev, devlen)); in jffs2_mknod()
672 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_mknod()
674 fn = jffs2_write_dnode(c, f, ri, (char *)&dev, devlen, ALLOC_NORMAL); in jffs2_mknod()
676 jffs2_free_raw_inode(ri); in jffs2_mknod()