aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRandy Dunlap <rdunlap@xenotime.net>2006-09-29 01:58:57 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 09:18:05 -0700
commit15a67dd8ccf696392176c95a08234a8b8ee59005 (patch)
tree8ae15dd6e51ad1df6cf89e539009b0e128b548ed /fs
parent87a57261105669d13a9cae747b5b67ca1cbcda3c (diff)
downloadkernel_samsung_smdk4412-15a67dd8ccf696392176c95a08234a8b8ee59005.zip
kernel_samsung_smdk4412-15a67dd8ccf696392176c95a08234a8b8ee59005.tar.gz
kernel_samsung_smdk4412-15a67dd8ccf696392176c95a08234a8b8ee59005.tar.bz2
[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.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 36d1808..6ede3a5 100644
--- a/fs/namespace.c
+++ b/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>
@@ -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();
}