mtd/fs/jffs3 nodemgmt.c,3.10,3.11 readinode.c,3.6,3.7

Artem Bityuckiy dedekind at infradead.org
Mon Jan 3 14:13:17 EST 2005


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

Modified Files:
	nodemgmt.c readinode.c 
Log Message:
Undo previous fix and fix it another way.


Index: nodemgmt.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/nodemgmt.c,v
retrieving revision 3.10
retrieving revision 3.11
diff -u -r3.10 -r3.11
--- nodemgmt.c	3 Jan 2005 18:48:36 -0000	3.10
+++ nodemgmt.c	3 Jan 2005 19:13:14 -0000	3.11
@@ -696,6 +696,12 @@
 		*p = ref->next_in_ino;
 		ref->next_in_ino = NULL;
 
+		if (ic->nodes == (void *)ic) {
+			DBG_NR(1, "inocache for ino #%u is all gone now. Freeing\n", ic->ino);
+			jffs3_del_ino_cache(c, ic);
+			jffs3_free_inode_cache(ic);
+		}
+
 		spin_unlock(&c->erase_completion_lock);
 	}
 

Index: readinode.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs3/readinode.c,v
retrieving revision 3.6
retrieving revision 3.7
diff -u -r3.6 -r3.7
--- readinode.c	25 Dec 2004 11:11:21 -0000	3.6
+++ readinode.c	3 Jan 2005 19:13:14 -0000	3.7
@@ -604,7 +604,7 @@
 		jffs3_free_full_dirent(fd);
 	}
 
-	if (f->inocache && f->inocache->state != INO_STATE_CHECKING)
+	if (!deleted && f->inocache->state != INO_STATE_CHECKING)
 		jffs3_set_inocache_state(c, f->inocache, INO_STATE_CHECKEDABSENT);
 
 	up(&f->sem);





More information about the linux-mtd-cvs mailing list