From: James Morris <jmorris@namei.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org, kkeil@suse.de, kai.germaschewski@gmx.de
Subject: [PATCH ISDN] Fix capifs bug in initialization error path.
Date: Fri, 26 Aug 2005 23:56:56 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.63.0508262339210.21123@excalibur.intercode> (raw)
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);
next reply other threads:[~2005-08-27 3:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-27 3:56 James Morris [this message]
2005-08-27 11:47 ` [PATCH ISDN] Fix capifs bug in initialization error path Karsten Keil
2005-08-27 20:59 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.63.0508262339210.21123@excalibur.intercode \
--to=jmorris@namei.org \
--cc=kai.germaschewski@gmx.de \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox