From: Randy Dunlap Date: Fri, 29 Sep 2006 08:58:57 +0000 (-0700) Subject: [PATCH] fs/namespace: handle init/registration errors X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=15a67dd8ccf696392176c95a08234a8b8ee59005;p=openwrt%2Fstaging%2Fblogic.git [PATCH] fs/namespace: handle init/registration errors Check and handle init errors. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/namespace.c b/fs/namespace.c index 36d180858136..6ede3a539ed8 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -1813,6 +1814,7 @@ void __init mnt_init(unsigned long mempages) struct list_head *d; unsigned int nr_hash; int i; + int err; init_rwsem(&namespace_sem); @@ -1853,8 +1855,14 @@ void __init mnt_init(unsigned long mempages) 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(); }