Lines Matching full: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()
208 inode_set_ctime_to_ts(dir_i, ITIME(je32_to_cpu(ri->ctime)))); in jffs2_create()
210 jffs2_free_raw_inode(ri); in jffs2_create()
221 jffs2_free_raw_inode(ri); in jffs2_create()
291 struct jffs2_raw_inode *ri; in jffs2_symlink() local
304 ri = jffs2_alloc_raw_inode(); in jffs2_symlink()
306 if (!ri) in jffs2_symlink()
315 ret = jffs2_reserve_space(c, sizeof(*ri) + targetlen, &alloclen, in jffs2_symlink()
319 jffs2_free_raw_inode(ri); in jffs2_symlink()
323 inode = jffs2_new_inode(dir_i, S_IFLNK | S_IRWXUGO, ri); in jffs2_symlink()
326 jffs2_free_raw_inode(ri); in jffs2_symlink()
336 ri->isize = ri->dsize = ri->csize = cpu_to_je32(inode->i_size); in jffs2_symlink()
337 ri->totlen = cpu_to_je32(sizeof(*ri) + inode->i_size); in jffs2_symlink()
338 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_symlink()
340 ri->compr = JFFS2_COMPR_NONE; in jffs2_symlink()
341 ri->data_crc = cpu_to_je32(crc32(0, target, targetlen)); in jffs2_symlink()
342 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_symlink()
344 fn = jffs2_write_dnode(c, f, ri, target, targetlen, ALLOC_NORMAL); in jffs2_symlink()
346 jffs2_free_raw_inode(ri); in jffs2_symlink()
455 struct jffs2_raw_inode *ri; in jffs2_mkdir() local
465 ri = jffs2_alloc_raw_inode(); in jffs2_mkdir()
466 if (!ri) in jffs2_mkdir()
475 ret = jffs2_reserve_space(c, sizeof(*ri), &alloclen, ALLOC_NORMAL, in jffs2_mkdir()
479 jffs2_free_raw_inode(ri); in jffs2_mkdir()
483 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_mkdir()
486 jffs2_free_raw_inode(ri); in jffs2_mkdir()
501 ri->data_crc = cpu_to_je32(0); in jffs2_mkdir()
502 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_mkdir()
504 fn = jffs2_write_dnode(c, f, ri, NULL, 0, ALLOC_NORMAL); in jffs2_mkdir()
506 jffs2_free_raw_inode(ri); in jffs2_mkdir()
629 struct jffs2_raw_inode *ri; in jffs2_mknod() local
639 ri = jffs2_alloc_raw_inode(); in jffs2_mknod()
640 if (!ri) in jffs2_mknod()
652 ret = jffs2_reserve_space(c, sizeof(*ri) + devlen, &alloclen, in jffs2_mknod()
656 jffs2_free_raw_inode(ri); in jffs2_mknod()
660 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_mknod()
663 jffs2_free_raw_inode(ri); in jffs2_mknod()
672 ri->dsize = ri->csize = cpu_to_je32(devlen); in jffs2_mknod()
673 ri->totlen = cpu_to_je32(sizeof(*ri) + devlen); in jffs2_mknod()
674 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_mknod()
676 ri->compr = JFFS2_COMPR_NONE; in jffs2_mknod()
677 ri->data_crc = cpu_to_je32(crc32(0, &dev, devlen)); in jffs2_mknod()
678 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_mknod()
680 fn = jffs2_write_dnode(c, f, ri, (char *)&dev, devlen, ALLOC_NORMAL); in jffs2_mknod()
682 jffs2_free_raw_inode(ri); in jffs2_mknod()