jffs2 Oops on 2.6.10-rc2

David Woodhouse dwmw2 at infradead.org
Mon Nov 22 06:05:32 EST 2004


On Mon, 2004-11-22 at 10:50 +0000, Ian Campbell wrote:
> Gah! Looks like I spoke to soon. Even with both of these patches I still
> see the BUG_ON, I've turned off pre-empt as well.

Quick fix... I suspect the real answer is a pass after the mount has
completed which merges all already-adjacent obsolete nodes, and
disassociates them from their inode.

Index: nodemgmt.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodemgmt.c,v
retrieving revision 1.114
diff -u -p -r1.114 nodemgmt.c
--- nodemgmt.c	20 Nov 2004 16:39:59 -0000	1.114
+++ nodemgmt.c	22 Nov 2004 11:03:49 -0000
@@ -601,8 +601,9 @@ void jffs2_mark_node_obsolete(struct jff
 
 
 	/* Merge with the next node in the physical list, if there is one
-	   and if it's also obsolete. */
-	if (ref->next_phys && ref_obsolete(ref->next_phys) ) {
+	   and if it's also obsolete and if it doesn't belong to any inode */
+	if (ref->next_phys && ref_obsolete(ref->next_phys) &&
+	    !ref->next_phys->next_in_ino) {
 		struct jffs2_raw_node_ref *n = ref->next_phys;
 		
 		spin_lock(&c->erase_completion_lock);


-- 
dwmw2





More information about the linux-mtd mailing list