Commit 95362fa9 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds

[PATCH] futex: init error check

Check register_filesystem() and kern_mount() return values.

Cc: Ingo Molnar <mingo@redhat.com>
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 01afb213
...@@ -1857,10 +1857,16 @@ static struct file_system_type futex_fs_type = { ...@@ -1857,10 +1857,16 @@ static struct file_system_type futex_fs_type = {
static int __init init(void) static int __init init(void)
{ {
unsigned int i; int i = register_filesystem(&futex_fs_type);
if (i)
return i;
register_filesystem(&futex_fs_type);
futex_mnt = kern_mount(&futex_fs_type); futex_mnt = kern_mount(&futex_fs_type);
if (IS_ERR(futex_mnt)) {
unregister_filesystem(&futex_fs_type);
return PTR_ERR(futex_mnt);
}
for (i = 0; i < ARRAY_SIZE(futex_queues); i++) { for (i = 0; i < ARRAY_SIZE(futex_queues); i++) {
INIT_LIST_HEAD(&futex_queues[i].chain); INIT_LIST_HEAD(&futex_queues[i].chain);
......
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