mtd/fs/jffs2 nodemgmt.c,1.112,1.113

David Woodhouse dwmw2 at infradead.org
Sat Nov 20 11:25:22 EST 2004


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

Modified Files:
	nodemgmt.c 
Log Message:
Free inocache if it's all gone. 


Index: nodemgmt.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodemgmt.c,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- nodemgmt.c	20 Nov 2004 14:25:05 -0000	1.112
+++ nodemgmt.c	20 Nov 2004 16:25:19 -0000	1.113
@@ -586,6 +586,12 @@
 		*p = ref->next_in_ino;
 		ref->next_in_ino = NULL;
 
+		if (ic->nodes == (void *)ic) {
+			D1(printk(KERN_DEBUG "inocache for ino #%u is all gone now. Freeing\n", ic->ino));
+			jffs2_del_ino_cache(c, ic);
+			jffs2_free_inode_cache(ic);
+		}
+
 		spin_unlock(&c->erase_completion_lock);
 	}
 





More information about the linux-mtd-cvs mailing list