/* Since the chain is invalid then we will have to erase it from its head (normally for INFTL we go from the oldest). But if it has a loop then there is no oldest...  */
static void format_chain(struct INFTLrecord *inftl, unsigned int first_block)
/* Since the chain is invalid then we will have to erase it from its head (normally for INFTL we go from the oldest). But if it has a loop then there is no oldest...  */
static void format_chain(struct INFTLrecord *inftl, unsigned int first_block)
{
	unsigned int block = first_block, block1;
	printk(KERN_WARNING "INFTL: formatting chain at block %d\n",
		first_block);
	for (;;) {
		block1 = inftl->PUtable[block];
		printk(KERN_WARNING "INFTL: formatting block %d\n", block);
		if (INFTL_formatblock(inftl, block) < 0) {
			inftl->PUtable[block] = BLOCK_RESERVED;
		} else {
			inftl->PUtable[block] = BLOCK_FREE;
		}
		block = block1;
		if (block == BLOCK_NIL || block >= inftl->lastEUN)
			break;
	}
}