• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/jffs2/

Lines Matching defs:ri

25 	struct jffs2_raw_inode *ri;
32 ri = jffs2_alloc_raw_inode();
33 if (!ri)
36 ret = jffs2_flash_read(c, ref_offset(fd->raw), sizeof(*ri), &readlen, (char *)ri);
38 jffs2_free_raw_inode(ri);
42 if (readlen != sizeof(*ri)) {
43 jffs2_free_raw_inode(ri);
45 ref_offset(fd->raw), sizeof(*ri), readlen);
48 crc = crc32(0, ri, sizeof(*ri)-8);
51 ref_offset(fd->raw), je32_to_cpu(ri->node_crc),
52 crc, je32_to_cpu(ri->dsize), je32_to_cpu(ri->csize),
53 je32_to_cpu(ri->offset), buf));
54 if (crc != je32_to_cpu(ri->node_crc)) {
56 je32_to_cpu(ri->node_crc), crc, ref_offset(fd->raw));
62 if (ri->compr == JFFS2_COMPR_ZERO && !je32_to_cpu(ri->dsize) &&
63 je32_to_cpu(ri->csize)) {
64 ri->dsize = ri->csize;
65 ri->csize = cpu_to_je32(0);
68 D1(if(ofs + len > je32_to_cpu(ri->dsize)) {
70 len, ofs, je32_to_cpu(ri->dsize));
76 if (ri->compr == JFFS2_COMPR_ZERO) {
87 if (ri->compr == JFFS2_COMPR_NONE && len == je32_to_cpu(ri->dsize)) {
90 readbuf = kmalloc(je32_to_cpu(ri->csize), GFP_KERNEL);
96 if (ri->compr != JFFS2_COMPR_NONE) {
97 if (len < je32_to_cpu(ri->dsize)) {
98 decomprbuf = kmalloc(je32_to_cpu(ri->dsize), GFP_KERNEL);
110 D2(printk(KERN_DEBUG "Read %d bytes to %p\n", je32_to_cpu(ri->csize),
112 ret = jffs2_flash_read(c, (ref_offset(fd->raw)) + sizeof(*ri),
113 je32_to_cpu(ri->csize), &readlen, readbuf);
115 if (!ret && readlen != je32_to_cpu(ri->csize))
120 crc = crc32(0, readbuf, je32_to_cpu(ri->csize));
121 if (crc != je32_to_cpu(ri->data_crc)) {
123 je32_to_cpu(ri->data_crc), crc, ref_offset(fd->raw));
128 if (ri->compr != JFFS2_COMPR_NONE) {
130 je32_to_cpu(ri->csize), readbuf, je32_to_cpu(ri->dsize), decomprbuf));
131 ret = jffs2_decompress(c, f, ri->compr | (ri->usercompr << 8), readbuf, decomprbuf, je32_to_cpu(ri->csize), je32_to_cpu(ri->dsize));
138 if (len < je32_to_cpu(ri->dsize)) {
148 jffs2_free_raw_inode(ri);