JFFS2_DBG_SUMMARY("processing summary index %d\n", i); 
dbg_summary("processing summary index %d\n", i); 
static int jffs2_sum_process_sum_data(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,				struct jffs2_summary_node *summary, uint32_t *pseudo_random){	struct jffs2_raw_node_ref *raw;	struct jffs2_inode_cache *ic;	struct jffs2_full_dirent *fd;	void *sp;	int i, ino;	sp = summary->sum;	for (i=0; i<je32_to_cpu(summary->sum_num); i++) {		JFFS2_DBG_SUMMARY("processing summary index %d\n", i);		switch (je16_to_cpu(((struct jffs2_sum_unknown_flash *)sp)->nodetype)) {			case JFFS2_NODETYPE_INODE: {				struct jffs2_sum_inode_flash *spi;				spi = sp;				ino = je32_to_cpu(spi->inode);				JFFS2_DBG_SUMMARY("Inode at 0x%08x\n",							jeb->offset + je32_to_cpu(spi->offset));				raw = jffs2_alloc_raw_node_ref();				if (!raw) {					JFFS2_NOTICE("allocation of node reference failed\n");					kfree(summary);					return -ENOMEM;				}				ic = jffs2_scan_make_ino_cache(c, ino);				if (!ic) {					JFFS2_NOTICE("scan_make_ino_cache failed\n");					jffs2_free_raw_node_ref(raw);					kfree(summary);					return -ENOMEM;				}				raw->flash_offset = (jeb->offset + je32_to_cpu(spi->offset)) | REF_UNCHECKED;				raw->__totlen = PAD(je32_to_cpu(spi->totlen));				raw->next_phys = NULL;				raw->next_in_ino = ic->nodes;				ic->nodes = raw;				if (!jeb->first_node)					jeb->first_node = raw;				if (jeb->last_node)					jeb->last_node->next_phys = raw;				jeb->last_node = raw;				*pseudo_random += je32_to_cpu(spi->version);				UNCHECKED_SPACE(PAD(je32_to_cpu(spi->totlen)));				sp += JFFS2_SUMMARY_INODE_SIZE;				break;			}			case JFFS2_NODETYPE_DIRENT: {				struct jffs2_sum_dirent_flash *spd;				spd = sp;				JFFS2_DBG_SUMMARY("Dirent at 0x%08x\n",							jeb->offset + je32_to_cpu(spd->offset));				fd = jffs2_alloc_full_dirent(spd->nsize+1);				if (!fd) {					kfree(summary);					return -ENOMEM;				}				memcpy(&fd->name, spd->name, spd->nsize);				fd->name[spd->nsize] = 0;				raw = jffs2_alloc_raw_node_ref();				if (!raw) {					jffs2_free_full_dirent(fd);					JFFS2_NOTICE("allocation of node reference failed\n");					kfree(summary);					return -ENOMEM;				}				ic = jffs2_scan_make_ino_cache(c, je32_to_cpu(spd->pino));				if (!ic) {					jffs2_free_full_dirent(fd);					jffs2_free_raw_node_ref(raw);					kfree(summary);					return -ENOMEM;				}				raw->__totlen = PAD(je32_to_cpu(spd->totlen));				raw->flash_offset = (jeb->offset + je32_to_cpu(spd->offset)) | REF_PRISTINE;				raw->next_phys = NULL;				raw->next_in_ino = ic->nodes;				ic->nodes = raw;				if (!jeb->first_node)					jeb->first_node = raw;				if (jeb->last_node)					jeb->last_node->next_phys = raw;				jeb->last_node = raw;				fd->raw = raw;				fd->next = NULL;				fd->version = je32_to_cpu(spd->version);				fd->ino = je32_to_cpu(spd->ino);				fd->nhash = full_name_hash(fd->name, spd->nsize);				fd->type = spd->type;				USED_SPACE(PAD(je32_to_cpu(spd->totlen)));				jffs2_add_fd_to_list(c, fd, &ic->scan_dents);				*pseudo_random += je32_to_cpu(spd->version);				sp += JFFS2_SUMMARY_DIRENT_SIZE(spd->nsize);				break;			}			default : {				JFFS2_WARNING("Unsupported node type found in summary! Exiting...");				kfree(summary);				return -EIO;			}		}	}	kfree(summary);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/733802d974e5af42acb7cd61b16c0ce6dd03b7ed/summary.c/buggy/fs/jffs2/summary.c