From: Colin Leroy <colin@colino.net>
To: Christoph Hellwig <hch@infradead.org>
Cc: Roman Zippel <zippel@linux-m68k.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] hfsplus: don't oops on bad FS
Date: Mon, 25 Apr 2005 22:12:42 +0200 [thread overview]
Message-ID: <20050425221242.680ed82d@jack.colino.net> (raw)
In-Reply-To: <20050425200704.GA16093@infradead.org>
On 25 Apr 2005 at 21h04, Christoph Hellwig wrote:
Hi,
> On Mon, Apr 25, 2005 at 10:03:45PM +0200, Colin Leroy wrote:
>
> absolutely no need to cast here.
Third update then :-)
Signed-off-by: Colin Leroy <colin@colino.net>
--- a/fs/hfsplus/super.c 2005-04-25 21:56:56.000000000 +0200
+++ b/fs/hfsplus/super.c 2005-04-25 21:58:39.000000000 +0200
@@ -226,6 +226,9 @@
brelse(HFSPLUS_SB(sb).s_vhbh);
if (HFSPLUS_SB(sb).nls)
unload_nls(HFSPLUS_SB(sb).nls);
+
+ kfree(sb->s_fs_info);
+ sb->s_fs_info = NULL;
}
static int hfsplus_statfs(struct super_block *sb, struct kstatfs *buf)
@@ -298,7 +301,7 @@
if (!silent)
printk("HFS+-fs: unable to parse mount options\n");
err = -EINVAL;
- goto cleanup;
+ goto cleanup_little;
}
/* temporarily use utf8 to correctly find the hidden dir below */
@@ -307,7 +310,7 @@
if (!nls) {
printk("HFS+: unable to load nls for utf8\n");
err = -EINVAL;
- goto cleanup;
+ goto cleanup_little;
}
/* Grab the volume header */
@@ -315,7 +318,7 @@
if (!silent)
printk("HFS+-fs: unable to find HFS+ superblock\n");
err = -EINVAL;
- goto cleanup;
+ goto cleanup_little;
}
vhdr = HFSPLUS_SB(sb).s_vhdr;
@@ -428,8 +431,12 @@
cleanup:
hfsplus_put_super(sb);
+
+cleanup_little:
if (nls)
unload_nls(nls);
+ sb->s_fs_info = NULL;
+ kfree(sbi);
return err;
}
next prev parent reply other threads:[~2005-04-25 20:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050425211915.126ddab5@jack.colino.net>
2005-04-25 19:53 ` [PATCH] hfsplus: don't oops on bad FS Roman Zippel
2005-04-25 20:03 ` Colin Leroy
2005-04-25 20:07 ` Christoph Hellwig
2005-04-25 20:12 ` Colin Leroy [this message]
2005-04-25 20:26 ` Roman Zippel
2005-04-26 6:59 ` Colin Leroy
2005-04-26 7:14 ` Colin Leroy
2005-04-25 20:29 ` Jesper Juhl
2005-05-01 5:08 ` Chris Wedgwood
2005-05-01 9:12 ` Colin Leroy
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=20050425221242.680ed82d@jack.colino.net \
--to=colin@colino.net \
--cc=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zippel@linux-m68k.org \
/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