Cannot remove child on JFFS2 FS with latest CVS

David Woodhouse dwmw2 at infradead.org
Wed Aug 28 10:31:23 EDT 2002


olivier.eribon at free.fr said:
>  Now with latest CVS Aug 28 2002, and 2.4.17 linux kernel on a
> specific  board (ppc405gp with a nand flash : Toshiba TC58256FT/DC),
> I have always the same message :

> Cannot remove child "fileXXX", ino #0, because it doesn't exist 

You don't have the latest code. Check the $Id$ tag in fs/jffs2/build.c.

 * $Id: build.c,v 1.38 2002/08/23 12:21:36 dwmw2 Exp $


Note the check of fd->ino which was added the first time this was reported:

		while(ic->scan->dents) {
			struct jffs2_inode_cache *child_ic;

			fd = ic->scan->dents;
			ic->scan->dents = fd->next;

			if (!fd->ino) {
				/* It's a deletion dirent. Ignore it */
				D1(printk(KERN_DEBUG "Child \"%s\" is a deletion dirent, skipping...\n", fd->name));
				jffs2_free_full_dirent(fd);
				continue;
			}
			if (!whinged) {
				whinged = 1;
				printk(KERN_NOTICE "Inode #%u was a directory with children - removing those too...\n", ic->ino);
			}

			D1(printk(KERN_DEBUG "Removing child \"%s\", ino #%u\n",
				  fd->name, fd->ino));
			
			child_ic = jffs2_get_ino_cache(c, fd->ino);
			if (!child_ic) {
				printk(KERN_NOTICE "Cannot remove child \"%s\", ino #%u, because it doesn't exist\n", fd->name, fd->ino);
				jffs2_free_full_dirent(fd);
				continue;
			}
			jffs2_free_full_dirent(fd);
			child_ic->nlink--;
		}
--
dwmw2






More information about the linux-mtd mailing list