patch-2.1.109 linux/fs/coda/psdev.c

Next file: linux/fs/coda/upcall.c
Previous file: linux/fs/coda/pioctl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.108/linux/fs/coda/psdev.c linux/fs/coda/psdev.c
@@ -64,7 +64,7 @@
 
 /* statistics */
 struct coda_upcallstats coda_callstats;
-int           coda_hard = 0;  /* introduces a timeout on upcalls */
+int           coda_hard = 0;  /* allows signals during upcalls */
 unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */
 extern struct coda_sb_info coda_super_info[MAX_CODADEVS];
 struct vcomm psdev_vcomm[MAX_CODADEVS];
@@ -401,7 +401,15 @@
 
 #ifdef CONFIG_PROC_FS
 
-extern struct proc_dir_entry proc_sys_root;
+struct proc_dir_entry proc_sys_root = {
+        PROC_SYS, 3, "sys",                     /* inode, name */
+        S_IFDIR | S_IRUGO | S_IXUGO, 2, 0, 0,   /* mode, nlink, uid, gid */
+        0, &proc_dir_inode_operations,          /* size, ops */
+        NULL, NULL,                             /* get_info, fill_inode */
+        NULL,                                   /* next */
+        NULL, NULL                              /* parent, subdir */
+};
+
 
 struct proc_dir_entry proc_sys_coda = {
         0, 4, "coda",
@@ -412,18 +420,9 @@
 	NULL, NULL
 };
 
-struct proc_dir_entry proc_fs = {
-        PROC_FS, 2, "fs",
-        S_IFDIR | S_IRUGO | S_IXUGO, 2, 0, 0,
-        0, &proc_dir_inode_operations,
-	NULL, NULL,
-	NULL,
-	NULL, NULL
-};
-
 /*
- * target directory structure:
-   /proc/fs/
+ target directory structure:
+   /proc/fs  (see linux/fs/proc/root.c)
    /proc/fs/coda
    /proc/fs/coda/{vfs_stats,
 
@@ -497,6 +496,23 @@
 
 #endif
 
+__initfunc(int init_coda(void)) 
+{
+	int status;
+	printk(KERN_INFO "Coda Kernel/Venus communications, v4.6.0, braam@cs.cmu.edu\n");
+	
+	status = init_coda_psdev();
+	if ( status ) {
+		printk("Problem (%d) in init_coda_psdev\n", status);
+		return status;
+	}
+	
+	status = init_coda_fs();
+	if (status) {
+		printk("coda: failed in init_coda_fs!\n");
+	}
+	return status;
+}
 
 int init_coda_psdev(void)
 {
@@ -515,13 +531,14 @@
 	reset_coda_cache_inv_stats();
 
 #ifdef CONFIG_PROC_FS
-	proc_register(&proc_root,&proc_fs);
-	proc_register(&proc_fs,&proc_fs_coda);
+	proc_register(&proc_root_fs,&proc_fs_coda);
 	proc_register(&proc_fs_coda,&proc_coda_vfs);
 	proc_register(&proc_fs_coda,&proc_coda_upcall);
 	proc_register(&proc_fs_coda,&proc_coda_permission);
 	proc_register(&proc_fs_coda,&proc_coda_cache_inv);
+#endif
 
+#ifdef CONFIG_SYSCTL
 	proc_register(&proc_sys_root,&proc_sys_coda);
 	proc_register(&proc_sys_coda,&proc_coda_vfs_control);
 	proc_register(&proc_sys_coda,&proc_coda_upcall_control);
@@ -542,20 +559,20 @@
 
 int init_module(void)
 {
-  int status;
-  printk(KERN_INFO "Coda Kernel/User communications module 2.0\n");
+	int status;
+	printk(KERN_INFO "Coda Kernel/Venus communications (module), v4.6.0, braam@cs.cmu.edu\n");
+
+	status = init_coda_psdev();
+	if ( status ) {
+		printk("Problem (%d) in init_coda_psdev\n", status);
+		return status;
+	}
 
-  status = init_coda_psdev();
-  if ( status ) {
-	  printk("Problem (%d) in init_coda_psdev\n", status);
-	  return status;
-  }
-
-  status = init_coda_fs();
-  if (status) {
-	  printk("coda: failed in init_coda_fs!\n");
-  }
-  return status;
+	status = init_coda_fs();
+	if (status) {
+		printk("coda: failed in init_coda_fs!\n");
+	}
+	return status;
 }
 
 
@@ -578,13 +595,14 @@
         proc_unregister(&proc_sys_coda, proc_coda_upcall_control.low_ino);
 	proc_unregister(&proc_sys_coda, proc_coda_vfs_control.low_ino);
 	proc_unregister(&proc_sys_root, proc_sys_coda.low_ino);
+#endif
 
+#ifdef CONFIG_SYSCTL
         proc_unregister(&proc_fs_coda, proc_coda_cache_inv.low_ino);
         proc_unregister(&proc_fs_coda, proc_coda_permission.low_ino);
         proc_unregister(&proc_fs_coda, proc_coda_upcall.low_ino);
         proc_unregister(&proc_fs_coda, proc_coda_vfs.low_ino);
-	proc_unregister(&proc_fs, proc_fs_coda.low_ino);
-	proc_unregister(&proc_root, proc_fs.low_ino);
+	proc_unregister(&proc_root_fs, proc_fs_coda.low_ino);
 #endif 
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov