diff options
author | Randy Dunlap <rdunlap@xenotime.net> | 2006-09-29 04:58:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 12:18:05 -0400 |
commit | 15a67dd8ccf696392176c95a08234a8b8ee59005 (patch) | |
tree | 8ae15dd6e51ad1df6cf89e539009b0e128b548ed /fs | |
parent | 87a57261105669d13a9cae747b5b67ca1cbcda3c (diff) |
[PATCH] fs/namespace: handle init/registration errors
Check and handle init errors.
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namespace.c | 12 |
1 files changed, 10 insertions, 2 deletions
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 @@ | |||
13 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
14 | #include <linux/smp_lock.h> | 14 | #include <linux/smp_lock.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/kernel.h> | ||
16 | #include <linux/quotaops.h> | 17 | #include <linux/quotaops.h> |
17 | #include <linux/acct.h> | 18 | #include <linux/acct.h> |
18 | #include <linux/capability.h> | 19 | #include <linux/capability.h> |
@@ -1813,6 +1814,7 @@ void __init mnt_init(unsigned long mempages) | |||
1813 | struct list_head *d; | 1814 | struct list_head *d; |
1814 | unsigned int nr_hash; | 1815 | unsigned int nr_hash; |
1815 | int i; | 1816 | int i; |
1817 | int err; | ||
1816 | 1818 | ||
1817 | init_rwsem(&namespace_sem); | 1819 | init_rwsem(&namespace_sem); |
1818 | 1820 | ||
@@ -1853,8 +1855,14 @@ void __init mnt_init(unsigned long mempages) | |||
1853 | d++; | 1855 | d++; |
1854 | i--; | 1856 | i--; |
1855 | } while (i); | 1857 | } while (i); |
1856 | sysfs_init(); | 1858 | err = sysfs_init(); |
1857 | subsystem_register(&fs_subsys); | 1859 | if (err) |
1860 | printk(KERN_WARNING "%s: sysfs_init error: %d\n", | ||
1861 | __FUNCTION__, err); | ||
1862 | err = subsystem_register(&fs_subsys); | ||
1863 | if (err) | ||
1864 | printk(KERN_WARNING "%s: subsystem_register error: %d\n", | ||
1865 | __FUNCTION__, err); | ||
1858 | init_rootfs(); | 1866 | init_rootfs(); |
1859 | init_mount_tree(); | 1867 | init_mount_tree(); |
1860 | } | 1868 | } |