mtd/fs/jffs inode-v23.c,1.72,1.73 jffs_proc.c,1.5,1.6

jonashg at infradead.org jonashg at infradead.org
Thu Mar 13 05:04:55 EST 2003


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

Modified Files:
	inode-v23.c jffs_proc.c 
Log Message:
On behalf of orjanf at axis.com:
* Allocate jffs_proc_root every time /proc/fs/jffs is registered since
  it's freed on unregister.


Index: inode-v23.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs/inode-v23.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- inode-v23.c	31 Jan 2002 11:42:57 -0000	1.72
+++ inode-v23.c	13 Mar 2003 10:04:52 -0000	1.73
@@ -1748,9 +1748,6 @@
 	printk(KERN_INFO "JFFS version " JFFS_VERSION_STRING
 		", (C) 1999, 2000  Axis Communications AB\n");
 	
-#ifdef CONFIG_JFFS_PROC_FS
-	jffs_proc_root = proc_mkdir("jffs", proc_root_fs);
-#endif
 	fm_cache = kmem_cache_create("jffs_fm", sizeof(struct jffs_fm),
 				     0, SLAB_HWCACHE_ALIGN, NULL, NULL);
 	node_cache = kmem_cache_create("jffs_node",sizeof(struct jffs_node),

Index: jffs_proc.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs/jffs_proc.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- jffs_proc.c	2 Jun 2001 14:34:55 -0000	1.5
+++ jffs_proc.c	13 Mar 2003 10:04:52 -0000	1.6
@@ -72,6 +72,11 @@
 	struct proc_dir_entry *part_layout = 0;
 	struct proc_dir_entry *part_root = 0;
 
+	/*
+	 * Needs to be allocated at each register since it's freed on unregister
+	 */
+	jffs_proc_root = proc_mkdir("jffs", proc_root_fs);
+
 	/* Allocate structure for local JFFS partition table */
 	if (!(part_dir = (struct jffs_partition_dir *)
 		kmalloc (sizeof (struct jffs_partition_dir), GFP_KERNEL))) {





More information about the linux-mtd-cvs mailing list