mtd/fs/jffs2/ecos/src fs-ecos.c,1.20,1.21 jffs2port.h,1.9,1.10 os-ecos.h,1.13,1.14

David Woodhouse dwmw2 at infradead.org
Wed Nov 26 08:23:33 EST 2003


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

Modified Files:
	fs-ecos.c jffs2port.h os-ecos.h 
Log Message:
Cruftectomy part 2

Index: fs-ecos.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/fs-ecos.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- fs-ecos.c	26 Nov 2003 13:08:08 -0000	1.20
+++ fs-ecos.c	26 Nov 2003 13:23:30 -0000	1.21
@@ -82,6 +82,7 @@
 
 
 static int jffs2_read_inode (struct _inode *inode);
+static void jffs2_clear_inode (struct _inode *inode);
 
 //==========================================================================
 // Filesystem table entries
@@ -2028,7 +2029,15 @@
 
 // -------------------------------------------------------------------------
 // EOF jffs2.c
-void jffs2_clear_inode (struct _inode *inode)
+
+
+static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
+{
+	memset(f, 0, sizeof(*f));
+	init_MUTEX_LOCKED(&f->sem);
+}
+
+static void jffs2_clear_inode (struct _inode *inode)
 {
         /* We can forget about this inode for now - drop all
          *  the nodelists associated with it, etc.

Index: jffs2port.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/jffs2port.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- jffs2port.h	26 Nov 2003 13:08:08 -0000	1.9
+++ jffs2port.h	26 Nov 2003 13:23:30 -0000	1.10
@@ -73,22 +73,6 @@
 
 typedef unsigned short umode_t;
 
-struct iattr {
-        unsigned int ia_valid;
-	umode_t		ia_mode;
-	uid_t		ia_uid;
-	gid_t		ia_gid;
-	loff_t		ia_size;
-	time_t		ia_atime;
-	time_t		ia_mtime;
-	time_t		ia_ctime;
-};
-
-struct page {
-	unsigned long index;
-	void *virtual;
-};
-
 
 struct iovec {
         void *iov_base;
@@ -102,16 +86,7 @@
 #define MAJOR(rdev) (rdev)>>8
 #define MINOR(rdev) (rdev)
 
-#define page_address(page)	((page)->virtual)
-
-static __inline__ void * kmap(struct page * page) {
-	return page_address(page);
-}
-
-#define kunmap(page) do { } while (0)
-
-
-//static struct _inode * new_inode(struct super_block *sb);
+struct _inode * ilookup(struct super_block *sb, cyg_uint32 ino);
 struct _inode * iget(struct super_block *sb, cyg_uint32 ino);
 void iput(struct _inode * i);
 

Index: os-ecos.h
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/ecos/src/os-ecos.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- os-ecos.h	26 Nov 2003 13:08:08 -0000	1.13
+++ os-ecos.h	26 Nov 2003 13:23:30 -0000	1.14
@@ -134,34 +134,30 @@
 #define JFFS2_F_I_RDEV_MIN(f) (MINOR(to_kdev_t(OFNI_EDONI_2SFFJ(f)->i_rdev)))
 #define JFFS2_F_I_RDEV_MAJ(f) (MAJOR(to_kdev_t(OFNI_EDONI_2SFFJ(f)->i_rdev)))
 
-//#define ITIME(sec) (sec)
-//#define I_SEC(x) (x)
 #define get_seconds cyg_timestamp
 
 struct _inode {
-
 	cyg_uint32		i_ino;
-	atomic_t		i_count;
-	//kdev_t			i_dev;
+
+	int			i_count;
 	mode_t			i_mode;
-	nlink_t			i_nlink;
+	nlink_t			i_nlink; // Could we dispense with this?
 	uid_t			i_uid;
 	gid_t			i_gid;
-	kdev_t			i_rdev;
-	off_t			i_size;
 	time_t			i_atime;
 	time_t			i_mtime;
 	time_t			i_ctime;
-	struct super_block	*i_sb;
-	//	unsigned int		i_flags;
-	//	atomic_t		i_writecount;
+	// union {
+	kdev_t			i_rdev; // For devices only
+        struct _inode *		i_parent; // For directories only
+	off_t			i_size; // For files only
+	// };
+	struct super_block *	i_sb;
 
 	struct jffs2_inode_info	jffs2_i;
 
-        struct _inode *i_parent;
-
-        struct _inode *i_cache_prev;
-        struct _inode *i_cache_next;
+        struct _inode *		i_cache_prev; // We need doubly-linked?
+        struct _inode *		i_cache_next;
 };
 
 #define JFFS2_SB_INFO(sb) (&(sb)->jffs2_sb)
@@ -216,14 +212,9 @@
 #else
 #error no nand yet
 #endif
-struct _inode *jffs2_new_inode (struct _inode *dir_i, int mode, struct jffs2_raw_inode *ri);
-void jffs2_clear_inode (struct _inode *inode);
 
-static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
-{
-	memset(f, 0, sizeof(*f));
-	init_MUTEX_LOCKED(&f->sem);
-}
+
+struct _inode *jffs2_new_inode (struct _inode *dir_i, int mode, struct jffs2_raw_inode *ri);
 
 #define BUG_ON(x) do { if (unlikely(x)) BUG(); } while(0)
 




More information about the linux-mtd-cvs mailing list