mtd/fs/jffs2 fs.c,1.42,1.43

gleixner at infradead.org gleixner at infradead.org
Fri May 7 12:00:34 EDT 2004


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv31710

Modified Files:
	fs.c 
Log Message:
flush write buffer on remount

Index: fs.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/fs.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- fs.c	5 May 2004 12:03:20 -0000	1.42
+++ fs.c	7 May 2004 16:00:31 -0000	1.43
@@ -349,9 +349,14 @@
 
 	/* We stop if it was running, then restart if it needs to.
 	   This also catches the case where it was stopped and this
-	   is just a remount to restart it */
-	if (!(sb->s_flags & MS_RDONLY))
+	   is just a remount to restart it.
+	   Flush the writebuffer, if neccecary, else we loose it */
+	if (!(sb->s_flags & MS_RDONLY)) {
 		jffs2_stop_garbage_collect_thread(c);
+		down(&c->alloc_sem);
+		jffs2_flush_wbuf_pad(c);
+		up(&c->alloc_sem);
+	}	
 
 	if (!(*flags & MS_RDONLY))
 		jffs2_start_garbage_collect_thread(c);




More information about the linux-mtd-cvs mailing list