Commit 820d220d authored by James Morris's avatar James Morris Committed by Linus Torvalds

[PATCH] Fix capifs bug in initialization error path.

This fixes a bug in the capifs initialization code, where the
filesystem is not unregistered if kern_mount() fails.
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
Signed-off-by: default avatarKarsten Keil <kkeil@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8dbddf17
......@@ -191,8 +191,10 @@ static int __init capifs_init(void)
err = register_filesystem(&capifs_fs_type);
if (!err) {
capifs_mnt = kern_mount(&capifs_fs_type);
if (IS_ERR(capifs_mnt))
if (IS_ERR(capifs_mnt)) {
err = PTR_ERR(capifs_mnt);
unregister_filesystem(&capifs_fs_type);
}
}
if (!err)
printk(KERN_NOTICE "capifs: Rev %s\n", rev);
......
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