mtd/fs/jffs2 build.c,1.64,1.65

David Woodhouse dwmw2 at infradead.org
Sat Nov 20 11:19:42 EST 2004


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv19258

Modified Files:
	build.c 
Log Message:
Fix freeing of refs belonging to unlinked inode


Index: build.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/build.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- build.c	20 Nov 2004 10:44:07 -0000	1.64
+++ build.c	20 Nov 2004 16:19:38 -0000	1.65
@@ -191,9 +191,12 @@
 
 	D1(printk(KERN_DEBUG "JFFS2: Removing ino #%u with nlink == zero.\n", ic->ino));
 	
-	for (raw = ic->nodes; raw != (void *)ic; raw = raw->next_in_ino) {
+	raw = ic->nodes;
+	while (raw != (void *)ic) {
+		struct jffs2_raw_node_ref *next = raw->next_in_ino;
 		D1(printk(KERN_DEBUG "obsoleting node at 0x%08x\n", ref_offset(raw)));
 		jffs2_mark_node_obsolete(c, raw);
+		raw = next;
 	}
 
 	if (ic->scan_dents) {





More information about the linux-mtd-cvs mailing list