Commit 15a67dd8 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds

[PATCH] fs/namespace: handle init/registration errors

Check and handle init errors.
Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 87a57261
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h>
#include <linux/quotaops.h> #include <linux/quotaops.h>
#include <linux/acct.h> #include <linux/acct.h>
#include <linux/capability.h> #include <linux/capability.h>
...@@ -1813,6 +1814,7 @@ void __init mnt_init(unsigned long mempages) ...@@ -1813,6 +1814,7 @@ void __init mnt_init(unsigned long mempages)
struct list_head *d; struct list_head *d;
unsigned int nr_hash; unsigned int nr_hash;
int i; int i;
int err;
init_rwsem(&namespace_sem); init_rwsem(&namespace_sem);
...@@ -1853,8 +1855,14 @@ void __init mnt_init(unsigned long mempages) ...@@ -1853,8 +1855,14 @@ void __init mnt_init(unsigned long mempages)
d++; d++;
i--; i--;
} while (i); } while (i);
sysfs_init(); err = sysfs_init();
subsystem_register(&fs_subsys); 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_rootfs();
init_mount_tree(); init_mount_tree();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment