mtd/fs/jffs2 gc.c,1.94,1.95

David Woodhouse dwmw2 at infradead.org
Fri Jan 17 20:35:40 EST 2003


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

Modified Files:
	gc.c 
Log Message:
Set ino state back to CHECKEDABSENT after jffs2_g_c_pristine() 
unconditionally, not only if it fails.


Index: gc.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/gc.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- gc.c	18 Jan 2003 00:26:21 -0000	1.94
+++ gc.c	18 Jan 2003 01:35:37 -0000	1.95
@@ -245,8 +245,10 @@
 		   we're at it, so we set the state accordingly */
 		if (ref_flags(raw) == REF_PRISTINE)
 			ic->state = INO_STATE_GC;
-		D1(printk("Ino #%u is absent but node not REF_PRISTINE. Reading.\n", 
-			  inum));
+		else {
+			D1(printk("Ino #%u is absent but node not REF_PRISTINE. Reading.\n", 
+				  inum));
+		}
 		break;
 
 	case INO_STATE_PRESENT:
@@ -301,11 +303,12 @@
 
 	if (ic->state == INO_STATE_GC) {
 		ret = jffs2_garbage_collect_pristine(c, ic, raw);
+		jffs2_set_inocache_state(c, ic, INO_STATE_CHECKEDABSENT);
+
 		if (ret != -EBADFD)
 			goto release_sem;
 
 		/* Fall through if it wanted us to */
-		jffs2_set_inocache_state(c, ic, INO_STATE_CHECKEDABSENT);
 	}
 
 	ret = jffs2_garbage_collect_live(c, jeb, raw, inum);





More information about the linux-mtd-cvs mailing list