mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-08 14:13:53 +00:00
[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: James Morris <jmorris@namei.org> Signed-off-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
8dbddf1782
commit
820d220de4
@ -191,8 +191,10 @@ static int __init capifs_init(void)
|
|||||||
err = register_filesystem(&capifs_fs_type);
|
err = register_filesystem(&capifs_fs_type);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
capifs_mnt = kern_mount(&capifs_fs_type);
|
capifs_mnt = kern_mount(&capifs_fs_type);
|
||||||
if (IS_ERR(capifs_mnt))
|
if (IS_ERR(capifs_mnt)) {
|
||||||
err = PTR_ERR(capifs_mnt);
|
err = PTR_ERR(capifs_mnt);
|
||||||
|
unregister_filesystem(&capifs_fs_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!err)
|
if (!err)
|
||||||
printk(KERN_NOTICE "capifs: Rev %s\n", rev);
|
printk(KERN_NOTICE "capifs: Rev %s\n", rev);
|
||||||
|
Loading…
Reference in New Issue
Block a user