• Home
  • Raw
  • Download

Lines Matching refs:ri

163 	struct jffs2_raw_inode *ri;  in jffs2_create()  local
169 ri = jffs2_alloc_raw_inode(); in jffs2_create()
170 if (!ri) in jffs2_create()
177 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_create()
181 jffs2_free_raw_inode(ri); in jffs2_create()
200 ret = jffs2_do_create(c, dir_f, f, ri, &dentry->d_name); in jffs2_create()
204 dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(ri->ctime)); in jffs2_create()
206 jffs2_free_raw_inode(ri); in jffs2_create()
217 jffs2_free_raw_inode(ri); in jffs2_create()
284 struct jffs2_raw_inode *ri; in jffs2_symlink() local
297 ri = jffs2_alloc_raw_inode(); in jffs2_symlink()
299 if (!ri) in jffs2_symlink()
308 ret = jffs2_reserve_space(c, sizeof(*ri) + targetlen, &alloclen, in jffs2_symlink()
312 jffs2_free_raw_inode(ri); in jffs2_symlink()
316 inode = jffs2_new_inode(dir_i, S_IFLNK | S_IRWXUGO, ri); in jffs2_symlink()
319 jffs2_free_raw_inode(ri); in jffs2_symlink()
329 ri->isize = ri->dsize = ri->csize = cpu_to_je32(inode->i_size); in jffs2_symlink()
330 ri->totlen = cpu_to_je32(sizeof(*ri) + inode->i_size); in jffs2_symlink()
331 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_symlink()
333 ri->compr = JFFS2_COMPR_NONE; in jffs2_symlink()
334 ri->data_crc = cpu_to_je32(crc32(0, target, targetlen)); in jffs2_symlink()
335 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_symlink()
337 fn = jffs2_write_dnode(c, f, ri, target, targetlen, ALLOC_NORMAL); in jffs2_symlink()
339 jffs2_free_raw_inode(ri); in jffs2_symlink()
446 struct jffs2_raw_inode *ri; in jffs2_mkdir() local
456 ri = jffs2_alloc_raw_inode(); in jffs2_mkdir()
457 if (!ri) in jffs2_mkdir()
466 ret = jffs2_reserve_space(c, sizeof(*ri), &alloclen, ALLOC_NORMAL, in jffs2_mkdir()
470 jffs2_free_raw_inode(ri); in jffs2_mkdir()
474 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_mkdir()
477 jffs2_free_raw_inode(ri); in jffs2_mkdir()
492 ri->data_crc = cpu_to_je32(0); in jffs2_mkdir()
493 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_mkdir()
495 fn = jffs2_write_dnode(c, f, ri, NULL, 0, ALLOC_NORMAL); in jffs2_mkdir()
497 jffs2_free_raw_inode(ri); in jffs2_mkdir()
617 struct jffs2_raw_inode *ri; in jffs2_mknod() local
627 ri = jffs2_alloc_raw_inode(); in jffs2_mknod()
628 if (!ri) in jffs2_mknod()
640 ret = jffs2_reserve_space(c, sizeof(*ri) + devlen, &alloclen, in jffs2_mknod()
644 jffs2_free_raw_inode(ri); in jffs2_mknod()
648 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_mknod()
651 jffs2_free_raw_inode(ri); in jffs2_mknod()
660 ri->dsize = ri->csize = cpu_to_je32(devlen); in jffs2_mknod()
661 ri->totlen = cpu_to_je32(sizeof(*ri) + devlen); in jffs2_mknod()
662 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_mknod()
664 ri->compr = JFFS2_COMPR_NONE; in jffs2_mknod()
665 ri->data_crc = cpu_to_je32(crc32(0, &dev, devlen)); in jffs2_mknod()
666 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_mknod()
668 fn = jffs2_write_dnode(c, f, ri, (char *)&dev, devlen, ALLOC_NORMAL); in jffs2_mknod()
670 jffs2_free_raw_inode(ri); in jffs2_mknod()