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()
208 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()
289 struct jffs2_raw_inode *ri; in jffs2_symlink() local
302 ri = jffs2_alloc_raw_inode(); in jffs2_symlink()
304 if (!ri) in jffs2_symlink()
313 ret = jffs2_reserve_space(c, sizeof(*ri) + targetlen, &alloclen, in jffs2_symlink()
317 jffs2_free_raw_inode(ri); in jffs2_symlink()
321 inode = jffs2_new_inode(dir_i, S_IFLNK | S_IRWXUGO, ri); in jffs2_symlink()
324 jffs2_free_raw_inode(ri); in jffs2_symlink()
334 ri->isize = ri->dsize = ri->csize = cpu_to_je32(inode->i_size); in jffs2_symlink()
335 ri->totlen = cpu_to_je32(sizeof(*ri) + inode->i_size); in jffs2_symlink()
336 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_symlink()
338 ri->compr = JFFS2_COMPR_NONE; in jffs2_symlink()
339 ri->data_crc = cpu_to_je32(crc32(0, target, targetlen)); in jffs2_symlink()
340 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_symlink()
342 fn = jffs2_write_dnode(c, f, ri, target, targetlen, ALLOC_NORMAL); in jffs2_symlink()
344 jffs2_free_raw_inode(ri); in jffs2_symlink()
453 struct jffs2_raw_inode *ri; in jffs2_mkdir() local
463 ri = jffs2_alloc_raw_inode(); in jffs2_mkdir()
464 if (!ri) in jffs2_mkdir()
473 ret = jffs2_reserve_space(c, sizeof(*ri), &alloclen, ALLOC_NORMAL, in jffs2_mkdir()
477 jffs2_free_raw_inode(ri); in jffs2_mkdir()
481 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_mkdir()
484 jffs2_free_raw_inode(ri); in jffs2_mkdir()
499 ri->data_crc = cpu_to_je32(0); in jffs2_mkdir()
500 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_mkdir()
502 fn = jffs2_write_dnode(c, f, ri, NULL, 0, ALLOC_NORMAL); in jffs2_mkdir()
504 jffs2_free_raw_inode(ri); in jffs2_mkdir()
626 struct jffs2_raw_inode *ri; in jffs2_mknod() local
636 ri = jffs2_alloc_raw_inode(); in jffs2_mknod()
637 if (!ri) in jffs2_mknod()
649 ret = jffs2_reserve_space(c, sizeof(*ri) + devlen, &alloclen, in jffs2_mknod()
653 jffs2_free_raw_inode(ri); in jffs2_mknod()
657 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_mknod()
660 jffs2_free_raw_inode(ri); in jffs2_mknod()
669 ri->dsize = ri->csize = cpu_to_je32(devlen); in jffs2_mknod()
670 ri->totlen = cpu_to_je32(sizeof(*ri) + devlen); in jffs2_mknod()
671 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_mknod()
673 ri->compr = JFFS2_COMPR_NONE; in jffs2_mknod()
674 ri->data_crc = cpu_to_je32(crc32(0, &dev, devlen)); in jffs2_mknod()
675 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_mknod()
677 fn = jffs2_write_dnode(c, f, ri, (char *)&dev, devlen, ALLOC_NORMAL); in jffs2_mknod()
679 jffs2_free_raw_inode(ri); in jffs2_mknod()