On Fri, Aug 26, 2005 at 11:56:56PM -0400, James Morris wrote:
> This patch fixes a bug in the capifs initialization code, where the 
> filesystem is not unregistered if kern_mount() fails.
> 
> Please apply.

looks OK for me.

Signed-off-by: James Morris <[EMAIL PROTECTED]>
Signed-off-by: Karsten Keil <[EMAIL PROTECTED]>
---

 capifs.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)


diff -purN -X dontdiff linux-2.6.13-mm2.o/drivers/isdn/capi/capifs.c 
linux-2.6.13-mm2.x/drivers/isdn/capi/capifs.c
--- linux-2.6.13-mm2.o/drivers/isdn/capi/capifs.c       2005-03-02 
02:37:50.000000000 -0500
+++ linux-2.6.13-mm2.x/drivers/isdn/capi/capifs.c       2005-08-26 
23:35:50.000000000 -0400
@@ -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);
-- 
Karsten Keil
SuSE Labs
ISDN development
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to