From 9a2fd7ec0f0b411f25a09e70d08137a7efbeb642 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Mon, 3 Mar 2003 22:17:19 -0600 Subject: [PATCH] sysfs: initialize from fs/namespace.c::mnt_init(). 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 | 2 ++ fs/sysfs/mount.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index d3d71542d4035..3bbf98e4b460c 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -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(); } diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 54158d6a2bc4a..b40d5e2eabcb6 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -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); -- 2.53.0