mtd/fs/jffs2/ecos/src fs-ecos.c,1.8,1.9

gthomas at infradead.org gthomas at infradead.org
Tue Jul 15 16:42:36 EDT 2003


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

Modified Files:
	fs-ecos.c 
Log Message:
Merge with latest eCos CVS

Index: fs-ecos.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/fs-ecos.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- fs-ecos.c	21 Jan 2003 18:13:01 -0000	1.8
+++ fs-ecos.c	15 Jul 2003 20:42:33 -0000	1.9
@@ -190,7 +190,7 @@
 		     cached_inode = next_inode) {
 			next_inode = cached_inode->i_cache_next;
 			if (cached_inode->i_count == 0) {
-				cached_inode->i_cache_prev->i_cache_next = cached_inode->i_cache_next;	// Prveious entry points ahead of us
+				cached_inode->i_cache_prev->i_cache_next = cached_inode->i_cache_next;	// Previous entry points ahead of us
 				if (cached_inode->i_cache_next != NULL)
 					cached_inode->i_cache_next->i_cache_prev = cached_inode->i_cache_prev;	// Next entry points behind us
 				jffs2_clear_inode(cached_inode);
@@ -502,7 +502,7 @@
 
 static int jffs2_mount(cyg_fstab_entry * fste, cyg_mtab_entry * mte)
 {
-	extern cyg_mtab_entry mtab[], mtab_end;
+	extern cyg_mtab_entry cyg_mtab[], cyg_mtab_end;
 	struct super_block *jffs2_sb = NULL;
 	struct jffs2_sb_info *c;
 	cyg_mtab_entry *m;
@@ -518,10 +518,10 @@
 	// Iterate through the mount table to see if we're mounted
 	// FIXME: this should be done better - perhaps if the superblock
 	// can be stored as an inode in the icache.
-	for (m = &mtab[0]; m != &mtab_end; m++) {
+	for (m = &cyg_mtab[0]; m != &cyg_mtab_end; m++) {
 		// stop if there are more than the configured maximum
-		if (m - &mtab[0] >= CYGNUM_FILEIO_MTAB_MAX) {
-			m = &mtab_end;
+		if (m - &cyg_mtab[0] >= CYGNUM_FILEIO_MTAB_MAX) {
+			m = &cyg_mtab_end;
 			break;
 		}
 		if (m->valid && strcmp(m->fsname, "jffs2") == 0 &&
@@ -1759,9 +1759,11 @@
 		for (cached_inode = i->i_sb->s_root; cached_inode != NULL;
 		     cached_inode = cached_inode->i_cache_next) {
 			if (cached_inode == i) {
-				cached_inode->i_cache_prev->i_cache_next = cached_inode->i_cache_next;	// Prveious entry points ahead of us
-				if (cached_inode->i_cache_next != NULL)
-					cached_inode->i_cache_next->i_cache_prev = cached_inode->i_cache_prev;	// Next entry points behind us
+                                if(cached_inode->i_cache_prev != NULL) {
+				        cached_inode->i_cache_prev->i_cache_next = cached_inode->i_cache_next;	// Previous entry points ahead of us
+				        if (cached_inode->i_cache_next != NULL)
+					        cached_inode->i_cache_next->i_cache_prev = cached_inode->i_cache_prev;	// Next entry points behind us
+                                }
 				break;
 			}
 		}




More information about the linux-mtd-cvs mailing list