mtd/fs/jffs2 write.c,1.77,1.78

David Woodhouse dwmw2 at infradead.org
Mon Nov 24 11:07:04 EST 2003


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

Modified Files:
	write.c 
Log Message:
Avoid writing page-crossing node in jffs2_write_inode_range()

Index: write.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/write.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- write.c	18 Nov 2003 21:14:02 -0000	1.77
+++ write.c	24 Nov 2003 16:07:01 -0000	1.78
@@ -373,7 +373,7 @@
 			break;
 		}
 		down(&f->sem);
-		datalen = writelen;
+		datalen = min_t(uint32_t, writelen, PAGE_CACHE_SIZE - (offset & (PAGE_CACHE_SIZE-1)));
 		cdatalen = min_t(uint32_t, alloclen - sizeof(*ri), writelen);
 
 		comprtype = jffs2_compress(buf, &comprbuf, &datalen, &cdatalen);




More information about the linux-mtd-cvs mailing list