mtd/fs/jffs2 writev.c,1.8,1.9

havasi at infradead.org havasi at infradead.org
Wed Mar 22 10:03:28 EST 2006


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

Modified Files:
	writev.c 
Log Message:
[JFFS2] Always do summary generation first and after flash write

The order of summary generation for a node and the writing out
is not important, but if we fix it, it will make the code a bit 
easier to understand.

The result of it will be that in jffs2_flash_direct_writev() and
also in jffs2_flash_direct_write() the summary will be generated
before flash writing. It was suggested by Joern.



Index: writev.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/writev.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- writev.c	9 Sep 2005 15:11:58 -0000	1.8
+++ writev.c	22 Mar 2006 15:03:25 -0000	1.9
@@ -63,7 +63,6 @@
 			size_t *retlen, const u_char *buf)
 {
 	int ret;
-	ret = c->mtd->write(c->mtd, ofs, len, retlen, buf);
 
 	if (jffs2_sum_active()) {
 		struct kvec vecs[1];
@@ -77,5 +76,7 @@
 			return res;
 		}
 	}
+
+	ret = c->mtd->write(c->mtd, ofs, len, retlen, buf);
 	return ret;
 }





More information about the linux-mtd-cvs mailing list