Skip to content

Commit

Permalink
[PATCH] fs/namespace: handle init/registration errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rddunlap authored and Linus Torvalds committed Sep 29, 2006
1 parent 87a5726 commit 15a67dd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 15a67dd

Please sign in to comment.