reiserfs: don't compile procfs.o at all if no support
[safe/jmp/linux-2.6] / fs / reiserfs / procfs.c
index 370988e..7a99811 100644 (file)
@@ -17,8 +17,6 @@
 #include <linux/init.h>
 #include <linux/proc_fs.h>
 
-#ifdef CONFIG_REISERFS_PROC_INFO
-
 /*
  * LOCKING:
  *
@@ -48,14 +46,6 @@ static int show_version(struct seq_file *m, struct super_block *sb)
        return 0;
 }
 
-int reiserfs_global_version_in_proc(char *buffer, char **start, off_t offset,
-                                   int count, int *eof, void *data)
-{
-       *start = buffer;
-       *eof = 1;
-       return 0;
-}
-
 #define SF( x ) ( r -> x )
 #define SFP( x ) SF( s_proc_info_data.x )
 #define SFPL( x ) SFP( x[ level ] )
@@ -492,7 +482,6 @@ int reiserfs_proc_info_init(struct super_block *sb)
        spin_lock_init(&__PINFO(sb).lock);
        REISERFS_SB(sb)->procdir = proc_mkdir(b, proc_info_root);
        if (REISERFS_SB(sb)->procdir) {
-               REISERFS_SB(sb)->procdir->owner = THIS_MODULE;
                REISERFS_SB(sb)->procdir->data = sb;
                add_file(sb, "version", show_version);
                add_file(sb, "super", show_super);
@@ -503,7 +492,7 @@ int reiserfs_proc_info_init(struct super_block *sb)
                add_file(sb, "journal", show_journal);
                return 0;
        }
-       reiserfs_warning(sb, "reiserfs: cannot create /proc/%s/%s",
+       reiserfs_warning(sb, "cannot create /proc/%s/%s",
                         proc_info_root_name, b);
        return 1;
 }
@@ -539,28 +528,12 @@ int reiserfs_proc_info_done(struct super_block *sb)
        return 0;
 }
 
-struct proc_dir_entry *reiserfs_proc_register_global(char *name,
-                                                    read_proc_t * func)
-{
-       return (proc_info_root) ? create_proc_read_entry(name, 0,
-                                                        proc_info_root,
-                                                        func, NULL) : NULL;
-}
-
-void reiserfs_proc_unregister_global(const char *name)
-{
-       remove_proc_entry(name, proc_info_root);
-}
-
 int reiserfs_proc_info_global_init(void)
 {
        if (proc_info_root == NULL) {
                proc_info_root = proc_mkdir(proc_info_root_name, NULL);
-               if (proc_info_root) {
-                       proc_info_root->owner = THIS_MODULE;
-               } else {
-                       reiserfs_warning(NULL,
-                                        "reiserfs: cannot create /proc/%s",
+               if (!proc_info_root) {
+                       reiserfs_warning(NULL, "cannot create /proc/%s",
                                         proc_info_root_name);
                        return 1;
                }
@@ -576,48 +549,6 @@ int reiserfs_proc_info_global_done(void)
        }
        return 0;
 }
-
-/* REISERFS_PROC_INFO */
-#else
-
-int reiserfs_proc_info_init(struct super_block *sb)
-{
-       return 0;
-}
-int reiserfs_proc_info_done(struct super_block *sb)
-{
-       return 0;
-}
-
-struct proc_dir_entry *reiserfs_proc_register_global(char *name,
-                                                    read_proc_t * func)
-{
-       return NULL;
-}
-
-void reiserfs_proc_unregister_global(const char *name)
-{;
-}
-
-int reiserfs_proc_info_global_init(void)
-{
-       return 0;
-}
-int reiserfs_proc_info_global_done(void)
-{
-       return 0;
-}
-
-int reiserfs_global_version_in_proc(char *buffer, char **start,
-                                   off_t offset,
-                                   int count, int *eof, void *data)
-{
-       return 0;
-}
-
-/* REISERFS_PROC_INFO */
-#endif
-
 /*
  * Revision 1.1.8.2  2001/07/15 17:08:42  god
  *  . use get_super() in procfs.c
@@ -634,7 +565,7 @@ int reiserfs_global_version_in_proc(char *buffer, char **start,
  *
  */
 
-/* 
+/*
  * Make Linus happy.
  * Local variables:
  * c-indentation-style: "K&R"