Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

James Morris and committed by
Linus Torvalds
820d220d 8dbddf17

+3 -1
+3 -1
drivers/isdn/capi/capifs.c
··· 191 191 err = register_filesystem(&capifs_fs_type); 192 192 if (!err) { 193 193 capifs_mnt = kern_mount(&capifs_fs_type); 194 - if (IS_ERR(capifs_mnt)) 194 + if (IS_ERR(capifs_mnt)) { 195 195 err = PTR_ERR(capifs_mnt); 196 + unregister_filesystem(&capifs_fs_type); 197 + } 196 198 } 197 199 if (!err) 198 200 printk(KERN_NOTICE "capifs: Rev %s\n", rev);