]> git.neil.brown.name Git - history.git/commitdiff
sysfs: initialize from fs/namespace.c::mnt_init().
authorPatrick Mochel <mochel@osdl.org>
Tue, 4 Mar 2003 04:17:19 +0000 (22:17 -0600)
committerPatrick Mochel <mochel@osdl.org>
Tue, 4 Mar 2003 04:17:19 +0000 (22:17 -0600)
This ensures that sysfs is initialized very early, before anything can
possibily registered with it.

It happens early enough that all filesystems can registered with sysfs
(besides sysfs itself), which is coming next.

fs/namespace.c
fs/sysfs/mount.c

index d3d71542d4035a311db72419fae49e5a1c3ed02a..3bbf98e4b460cd66fdfd2e899477ecf36433de7e 100644 (file)
@@ -26,6 +26,7 @@
 extern struct vfsmount *do_kern_mount(const char *type, int flags, char *name, void *data);
 extern int do_remount_sb(struct super_block *sb, int flags, void * data);
 extern int __init init_rootfs(void);
+extern int __init sysfs_init(void);
 
 static struct list_head *mount_hashtable;
 static int hash_mask, hash_bits;
@@ -1132,6 +1133,7 @@ void __init mnt_init(unsigned long mempages)
                d++;
                i--;
        } while (i);
+       sysfs_init();
        init_rootfs();
        init_mount_tree();
 }
index 54158d6a2bc4a53d98b084766bf37b3389a16243..b40d5e2eabcb6376db3d0f7c3c05351bd6dc99f1 100644 (file)
@@ -65,7 +65,7 @@ static struct file_system_type sysfs_fs_type = {
        .kill_sb        = kill_litter_super,
 };
 
-static int __init sysfs_init(void)
+int __init sysfs_init(void)
 {
        int err;
 
@@ -80,5 +80,3 @@ static int __init sysfs_init(void)
        }
        return err;
 }
-
-core_initcall(sysfs_init);