From: Randy Dunlap Check and handle init errors. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton --- fs/namespace.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff -puN fs/namespace.c~fs-namespace-handle-init-registration-errors fs/namespace.c --- a/fs/namespace.c~fs-namespace-handle-init-registration-errors +++ a/fs/namespace.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -1812,6 +1813,7 @@ void __init mnt_init(unsigned long mempa struct list_head *d; unsigned int nr_hash; int i; + int err; init_rwsem(&namespace_sem); @@ -1852,8 +1854,14 @@ void __init mnt_init(unsigned long mempa d++; i--; } while (i); - sysfs_init(); - subsystem_register(&fs_subsys); + err = sysfs_init(); + if (err) + printk(KERN_WARNING "%s: sysfs_init error: %d\n", + __FUNCTION__, err); + err = subsystem_register(&fs_subsys); + if (err) + printk(KERN_WARNING "%s: subsystem_register error: %d\n", + __FUNCTION__, err); init_rootfs(); init_mount_tree(); } _