From: Todd Poynor Yoann Vandoorselaere noticed an attempt to mount a JFFS2 filesystem read-only mounts writeable instead. From: David Woodhouse and make it fix the memory leak on failure too: Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton --- 25-akpm/fs/jffs2/super.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN fs/jffs2/super.c~jffs2-mount-options-discarded fs/jffs2/super.c --- 25/fs/jffs2/super.c~jffs2-mount-options-discarded Tue Aug 24 15:07:42 2004 +++ 25-akpm/fs/jffs2/super.c Tue Aug 24 15:07:42 2004 @@ -7,7 +7,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: super.c,v 1.97 2004/07/16 15:17:57 dwmw2 Exp $ + * $Id: super.c,v 1.99 2004/08/24 07:59:57 dwmw2 Exp $ * */ @@ -130,7 +130,7 @@ static struct super_block *jffs2_get_sb_ mtd->index, mtd->name)); sb->s_op = &jffs2_super_operations; - sb->s_flags |= MS_NOATIME; + sb->s_flags = flags | MS_NOATIME; ret = jffs2_do_fill_super(sb, data, (flags&MS_VERBOSE)?1:0); @@ -330,6 +330,7 @@ static int __init init_jffs2_fs(void) out_compressors: jffs2_compressors_exit(); out: + kmem_cache_destroy(jffs2_inode_cachep); return ret; } _