![]() | |||||||||||||
Messages in this thread Patch in this message |
From: Randy Dunlap <rdunlap@xenotime.net> Check and handle init errors. sysfs_init() isn't __must_check, but it makes sense to check it too while we are at it. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> --- fs/namespace.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) --- linux-2618-rc1mm1.orig/fs/namespace.c +++ linux-2618-rc1mm1/fs/namespace.c @@ -13,6 +13,7 @@ #include <linux/sched.h> #include <linux/smp_lock.h> #include <linux/init.h> +#include <linux/kernel.h> #include <linux/quotaops.h> #include <linux/acct.h> #include <linux/capability.h> @@ -1815,6 +1816,7 @@ void __init mnt_init(unsigned long mempa struct list_head *d; unsigned int nr_hash; int i; + int err; init_rwsem(&namespace_sem); @@ -1855,8 +1857,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(); } --- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2006-07-12 07:49 [from the cache] ©2003-2008 | |||||||||||||