lkml.org 
[lkml]   [2005]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH ISDN] Fix capifs bug in initialization error path.
This patch fixes a bug in the capifs initialization code, where the 
filesystem is not unregistered if kern_mount() fails.

Please apply.

Signed-off-by: James Morris <jmorris@namei.org>

---

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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-27 05:59    [W:0.030 / U:7.412 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site