[PATCH] JFFS2 mount options discarded

Todd Poynor tpoynor at mvista.com
Tue Aug 17 19:50:10 EDT 2004


Yoann Vandoorselaere noticed an attempt to mount a JFFS2 filesystem
read-only mounts writeable instead.  I believe the fix is:

--- linux-2.6.8.1-orig/fs/jffs2/super.c	2004-08-15 11:46:43.000000000 -0700
+++ linux-2.6.8.1-jffs2-mount-fix/fs/jffs2/super.c	2004-08-17 15:45:17.935379784 -0700
@@ -130,7 +130,7 @@
 		  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);
 

Clue me in if I'm off-base, thanks,

-- 
Todd Poynor
MontaVista Software





More information about the linux-mtd mailing list