mtd/fs/jffs2 scan.c,1.134,1.135

David Woodhouse dwmw2 at infradead.org
Thu Feb 9 11:13:01 EST 2006


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

Modified Files:
	scan.c 
Log Message:
Avoid divide-by-zero

Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -r1.134 -r1.135
--- scan.c	13 Jan 2006 10:25:29 -0000	1.134
+++ scan.c	9 Feb 2006 16:12:59 -0000	1.135
@@ -239,7 +239,7 @@
 		c->nextblock->dirty_size = 0;
 	}
 #ifdef CONFIG_JFFS2_FS_WRITEBUFFER
-	if (!jffs2_can_mark_obsolete(c) && c->nextblock && (c->nextblock->free_size % c->wbuf_pagesize)) {
+	if (!jffs2_can_mark_obsolete(c) && c->wbuf_pagesize && c->nextblock && (c->nextblock->free_size % c->wbuf_pagesize)) {
 		/* If we're going to start writing into a block which already
 		   contains data, and the end of the data isn't page-aligned,
 		   skip a little and align it. */





More information about the linux-mtd-cvs mailing list